-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GHI-#7 Update public API JavaDoc to match Nord color palette docs
- Loading branch information
1 parent
f241e8d
commit 67dcb4d
Showing
4 changed files
with
82 additions
and
77 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | ||
title Nord API + | ||
project nord-java + | ||
version 0.1.0 + | ||
repository https://github.com/arcticicestudio/nord-java + | ||
author Arctic Ice Studio + | ||
email [email protected] + | ||
|
@@ -16,8 +15,14 @@ copyright Copyright (C) 2016 + | |
import java.util.regex.Pattern; | ||
|
||
/** | ||
* Public API entry point of the <a href="https://github.com/arcticicestudio/nord-java">Nord - Java</a> project, which | ||
* implements the <a href="https://github.com/arcticicestudio/nord">Nord</a> color palette. | ||
* A arctic, north-bluish color palette Java library. | ||
* Created for the clean- and minimal flat design pattern to achieve a optimal focus and readability for code syntax | ||
* highlighting and UI. | ||
* It consists of a total of sixteen, carefully selected, dimmed pastel colors for a eye-comfortable, but yet colorful | ||
* ambiance. | ||
* <p> | ||
* Public API entry point of the <a href="https://github.com/arcticicestudio/nord-java">Nord Java</a> project, which | ||
* implements the <a href="https://github.com/arcticicestudio/nord">Nord</a> color palette. | ||
* | ||
* <div> | ||
* <table summary="Nord Color Palette"> | ||
|
@@ -60,100 +65,114 @@ copyright Copyright (C) 2016 + | |
*/ | ||
public enum Nord { | ||
/** | ||
* The color {@code nord0} of the "Polar Night" component with an RGB value of {@code rgb(46, 52, 64)} and an HEX | ||
* value of {@code #2E3440}. | ||
* <div style="border:none;width:25px;height:30px;background-color:rgb(46,52,64);margin: 0"></div> | ||
* Base component color "{@code nord0}" of "Polar Night" with a RGB value of {@code rgb(46, 52, 64)} and a HEX value | ||
* of {@code #2E3440}. | ||
* <p> | ||
* <div style="border:none;width:25px;height:25px;background-color:rgb(46,52,64);margin:0"></div> | ||
*/ | ||
NORD0(46, 52, 64), | ||
|
||
/** | ||
* The color {@code nord1} of the "Polar Night" component with an RGB value of {@code rgb(59, 66, 82)} and an HEX | ||
* value of {@code #3B4252}. | ||
* <div style="border:none;width:25px;height:30px;background-color:rgb(59,66,82);margin: 0"></div> | ||
* Brighter color "{@code nord1}" of the "Polar Night" component base color {@link #NORD0} with a RGB value of | ||
* {@code rgb(59, 66, 82)} and a HEX value of {@code #3B4252}. | ||
* <p> | ||
* <div style="border:none;width:25px;height:25px;background-color:rgb(59,66,82);margin:0"></div> | ||
*/ | ||
NORD1(59, 66, 82), | ||
|
||
/** | ||
* The color {@code nord2} of the "Polar Night" component with an RGB value of {@code rgb(67, 76, 94)} and an HEX | ||
* value of {@code #434C5E}. | ||
* <div style="border:none;width:25px;height:30px;background-color:rgb(67,76,94);margin: 0"></div> | ||
* Brighter color "{@code nord2}" of the "Polar Night" component base color {@link #NORD0} with a RGB value of | ||
* {@code rgb(67, 76, 94)} and a HEX value of {@code #434C5E}. | ||
* <p> | ||
* <div style="border:none;width:25px;height:25px;background-color:rgb(67,76,94);margin:0"></div> | ||
*/ | ||
NORD2(67, 76, 94), | ||
|
||
/** | ||
* The color {@code nord3} of the "Polar Night" component with an RGB value of {@code rgb(76, 86, 106)} and an HEX | ||
* value of {@code #4C566A}. | ||
* <div style="border:none;width:25px;height:30px;background-color:rgb(76,86,106);margin: 0"></div> | ||
* Brighter color "{@code nord3}" of the "Polar Night" component base color {@link #NORD0} with a RGB value of | ||
* {@code rgb(76, 86, 106)} and a HEX value of {@code #4C566A}. | ||
* <p> | ||
* <div style="border:none;width:25px;height:25px;background-color:rgb(76,86,106);margin:0"></div> | ||
*/ | ||
NORD3(76, 86, 106), | ||
|
||
/** | ||
* The color {@code nord4} of the "Snow Storm" component with an RGB value of {@code rgb(216, 222, 233)} and an HEX | ||
* value of {@code #D8DEE9}. | ||
* <div style="border:none;width:25px;height:30px;background-color:rgb(216,222,233);margin: 0"></div> | ||
* Base component color "{@code nord4}" of "Snow Storm" with a RGB value of {@code rgb(216, 222, 233)} and a HEX value | ||
* of {@code #D8DEE9}. | ||
* <p> | ||
* <div style="border:none;width:25px;height:25px;background-color:rgb(216,222,233);margin:0"></div> | ||
*/ | ||
NORD4(216, 222, 233), | ||
|
||
/** | ||
* The color {@code nord5} of the "Snow Storm" component with an RGB value of {@code rgb(229, 233, 240)} and an HEX | ||
* value of {@code #E5E9F0}. | ||
* <div style="border:none;width:25px;height:30px;background-color:rgb(229,233,240);margin: 0"></div> | ||
* Brighter color "{@code nord5}" of the "Snow Storm" component base color {@link #NORD4} with a RGB value of | ||
* {@code rgb(229, 233, 240)} and a HEX value of {@code #E5E9F0}. | ||
* <p> | ||
* <div style="border:none;width:25px;height:25px;background-color:rgb(229,233,240);margin:0"></div> | ||
*/ | ||
NORD5(229, 233, 240), | ||
|
||
/** | ||
* The color {@code nord6} of the "Snow Storm" component with an RGB value of {@code rgb(236, 239, 244)} and an HEX | ||
* value of {@code #ECEFF4}. | ||
* <div style="border:none;width:25px;height:30px;background-color:rgb(236,239,244);margin: 0"></div> | ||
* Brighter color "{@code nord6}" of the "Snow Storm" component base color {@link #NORD4} with a RGB value of | ||
* {@code rgb(236, 239, 244)} and a HEX value of {@code #ECEFF4}. | ||
* <p> | ||
* <div style="border:none;width:25px;height:25px;background-color:rgb(236,239,244);margin:0"></div> | ||
*/ | ||
NORD6(236, 239, 244), | ||
|
||
/** | ||
* The color {@code nord7} of the "Frost" component with an RGB value of {@code rgb(143, 188, 187)} and an HEX | ||
* value of {@code #8FBCBB}. | ||
* <div style="border:none;width:25px;height:30px;background-color:rgb(143,188,187);margin: 0"></div> | ||
* Bluish core color "{@code nord7}" of the "Frost" component with a RGB value of {@code rgb(143, 188, 187)} and a | ||
* HEX value of {@code #8FBCBB}. | ||
* <p> | ||
* <div style="border:none;width:25px;height:25px;background-color:rgb(143,188,187);margin:0"></div> | ||
*/ | ||
NORD7(143, 188, 187), | ||
|
||
/** | ||
* The color {@code nord8} of the "Frost" component with an RGB value of {@code rgb(136, 192, 208)} and an HEX | ||
* value of {@code #88C0D0}. | ||
* <div style="border:none;width:25px;height:30px;background-color:rgb(136,192,208);margin: 0"></div> | ||
* Bluish core accent color "{@code nord8}" of the "Frost" component with a RGB value of {@code rgb(136, 192, 208)} | ||
* and a HEX value of {@code #88C0D0}. | ||
* <p> | ||
* <div style="border:none;width:25px;height:25px;background-color:rgb(136,192,208);margin:0"></div> | ||
*/ | ||
NORD8(136, 192, 208), | ||
|
||
/** | ||
* The color {@code nord9} of the "Frost" component with an RGB value of {@code rgb(129, 161, 193)} and an HEX | ||
* value of {@code #81A1C1}. | ||
* <div style="border:none;width:25px;height:30px;background-color:rgb(129,161,193);margin: 0"></div> | ||
* Bluish core color "{@code nord9}" of the "Frost" component with a RGB value of {@code rgb(129, 161, 193)} and a | ||
* HEX value of {@code #81A1C1}. | ||
* <p> | ||
* <div style="border:none;width:25px;height:25px;background-color:rgb(129,161,193);margin:0"></div> | ||
*/ | ||
NORD9(129, 161, 193), | ||
|
||
/** | ||
* The color {@code nord10} of the "Frost" component with an RGB value of {@code rgb(94, 129, 172)} and an HEX | ||
* value of {@code #5E81AC}. | ||
* <div style="border:none;width:25px;height:30px;background-color:rgb(94,129,172);margin: 0"></div> | ||
* Bluish core color "{@code nord10}" of the "Frost" component with a RGB value of {@code rgb(94, 129, 172)} and a | ||
* HEX value of {@code #5E81AC}. | ||
* <p> | ||
* <div style="border:none;width:25px;height:25px;background-color:rgb(94,129,172);margin:0"></div> | ||
*/ | ||
NORD10(94, 129, 172), | ||
|
||
/** | ||
* The color {@code nord11} of the "Aurora" component with an RGB value of {@code rgb(191, 97, 106)} and an HEX | ||
* value of {@code #BF616A}. | ||
* <div style="border:none;width:25px;height:30px;background-color:rgb(191,97,106);margin: 0"></div> | ||
* Colorful color "{@code nord11}" of the "Aurora" component with a RGB value of {@code rgb(191, 97, 106)} and a | ||
* HEX value of {@code #BF616A}. | ||
* <p> | ||
* <div style="border:none;width:25px;height:25px;background-color:rgb(191,97,106);margin:0"></div> | ||
*/ | ||
NORD11(191, 97, 106), | ||
|
||
/** | ||
* The color {@code nord12} of the "Aurora" component with an RGB value of {@code rgb(208, 135, 112)} and an HEX | ||
* value of {@code #D08770}. | ||
* <div style="border:none;width:25px;height:30px;background-color:rgb(208,135,112);margin: 0"></div> | ||
* Colorful color "{@code nord12}" of the "Aurora" component with a RGB value of {@code rgb(208, 135, 112)} and a | ||
* HEX value of {@code #D08770}. | ||
* <p> | ||
* <div style="border:none;width:25px;height:25px;background-color:rgb(208,135,112);margin:0"></div> | ||
*/ | ||
NORD12(208, 135, 112), | ||
|
||
/** | ||
* The color {@code nord13} of the "Aurora" component with an RGB value of {@code rgb(235, 203, 139)} and an HEX | ||
* value of {@code #EBCB8B}. | ||
* <div style="border:none;width:25px;height:30px;background-color:rgb(235,203,139);margin: 0"></div> | ||
* Colorful color "{@code nord13}" of the "Aurora" component with a RGB value of {@code rgb(235, 203, 139)} and a | ||
* HEX value of {@code #EBCB8B}. | ||
* <p> | ||
* <div style="border:none;width:25px;height:25px;background-color:rgb(235,203,139);margin:0"></div> | ||
*/ | ||
NORD13(235, 203, 139), | ||
|
||
|
@@ -165,19 +184,20 @@ public enum Nord { | |
NORD14(163, 190, 140), | ||
|
||
/** | ||
* The color {@code nord15} of the "Aurora" component with an RGB value of {@code rgb(180, 142, 173)} and an HEX | ||
* value of {@code #B48EAD}. | ||
* <div style="border:none;width:25px;height:30px;background-color:rgb(180,142,173);margin: 0"></div> | ||
* Colorful color "{@code nord15}" of the "Aurora" component with a RGB value of {@code rgb(180, 142, 173)} and a | ||
* HEX value of {@code #B48EAD}. | ||
* <p> | ||
* <div style="border:none;width:25px;height:25px;background-color:rgb(180,142,173);margin:0"></div> | ||
*/ | ||
NORD15(180, 142, 173); | ||
|
||
/** | ||
* Compiled pattern to convert the RGB and HEX color values. | ||
* Prefix pattern to convert RGB- and HEX color values. | ||
*/ | ||
private static final Pattern COLOR_PREFIX = Pattern.compile("0x", Pattern.LITERAL); | ||
|
||
/** | ||
* Contains the RGB color code. | ||
* The RGB color code. | ||
*/ | ||
private final Color COLOR; | ||
|
||
|
@@ -193,19 +213,19 @@ public enum Nord { | |
} | ||
|
||
/** | ||
* Converts the {@code color} to the HEX identifier. | ||
* Converts the specified color to the HEX identifier. | ||
* | ||
* @param color the color object | ||
* @param color the color object to convert | ||
* @return the string representation of the HEX identifier | ||
*/ | ||
public static String hex(final Color color) { | ||
return COLOR_PREFIX.matcher(color.toString()).replaceAll("#").substring(0, 7).toUpperCase(); | ||
} | ||
|
||
/** | ||
* Converts the {@code color} to the RGB identifier. | ||
* Converts the specified color to the RGB identifier. | ||
* | ||
* @param color the color object | ||
* @param color the color object to convert | ||
* @return the string representation of the RGB identifier | ||
*/ | ||
public static String rgb(final Color color) { | ||
|
@@ -222,7 +242,7 @@ public static String rgb(final Color color) { | |
} | ||
|
||
/** | ||
* Returns the color object. | ||
* The color constant as color object. | ||
* | ||
* @return the color object | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,24 +2,20 @@ | |
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | ||
title Nord API Package Info + | ||
project nord-java + | ||
version 0.1.0 + | ||
repository https://github.com/arcticicestudio/nord-java + | ||
author Arctic Ice Studio + | ||
email [email protected] + | ||
copyright Copyright (C) 2016 + | ||
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | ||
*/ | ||
/** | ||
* Public API of the <a href="https://github.com/arcticicestudio/nord-java">Nord - Java</a> project, which implements | ||
* Public API of the <a href="https://github.com/arcticicestudio/nord-java">Nord Java</a> project, which implements | ||
* the <a href="https://github.com/arcticicestudio/nord">Nord</a> color palette. | ||
* | ||
* <p> | ||
* The main entry point of the API is the {@link com.arcticicestudio.nord.Nord} enum. | ||
* </p> | ||
* The public API entry point is the {@link com.arcticicestudio.nord.Nord} enum. | ||
* | ||
* @author Arctic Ice Studio <[email protected]> | ||
* @see <a href="https://github.com/arcticicestudio/nord-java">Nord - Java </a> | ||
* @see <a href="https://github.com/arcticicestudio/nord">Nord</a> | ||
* @version 0.1.0 | ||
* @since 0.1.0 | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | ||
title Nord API Unit Test + | ||
project nord-java + | ||
version 0.1.0 + | ||
repository https://github.com/arcticicestudio/nord-java + | ||
author Arctic Ice Studio + | ||
email [email protected] + | ||
|
@@ -16,15 +15,15 @@ copyright Copyright (C) 2016 + | |
import static org.junit.Assert.assertEquals; | ||
|
||
/** | ||
* Unit tests for the public API {@link Nord}. | ||
* Unit tests for the {@link Nord} public API. | ||
* | ||
* @author Arctic Ice Studio <[email protected]> | ||
* @see Nord | ||
* @since 0.1.0 | ||
*/ | ||
public class NordTest { | ||
|
||
@Test | ||
public void shouldReturnTheCorrectHEXColorCode() { | ||
public void shouldReturnHEXColorCode() { | ||
assertEquals(Nord.hex(Nord.NORD0.get()), "#2E3440"); | ||
assertEquals(Nord.hex(Nord.NORD1.get()), "#3B4252"); | ||
assertEquals(Nord.hex(Nord.NORD2.get()), "#434C5E"); | ||
|
@@ -64,7 +63,7 @@ public void shouldReturnTheCorrectRGBColorCode() { | |
} | ||
|
||
@Test | ||
public void shouldReturnTheCorrectVersionString() { | ||
public void shouldReturnValidArcVerVersionString() { | ||
assertEquals(Nord.NORD0.getVersion(), "0.1.0"); | ||
} | ||
} |