From 67dcb4dd3cedd75a3eeed13587f57171c165e9b9 Mon Sep 17 00:00:00 2001 From: Arctic Ice Studio Date: Sat, 3 Dec 2016 11:05:06 +0100 Subject: [PATCH] GHI-#7 Update public API JavaDoc to match Nord color palette docs --- .idea/misc.xml | 12 +- .../java/com/arcticicestudio/nord/Nord.java | 130 ++++++++++-------- .../arcticicestudio/nord/package-info.java | 8 +- .../com/arcticicestudio/nord/NordTest.java | 9 +- 4 files changed, 82 insertions(+), 77 deletions(-) diff --git a/.idea/misc.xml b/.idea/misc.xml index b881e27..e75306d 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -35,17 +35,7 @@ - - - - - - - - - - - + \ No newline at end of file diff --git a/src/main/java/com/arcticicestudio/nord/Nord.java b/src/main/java/com/arcticicestudio/nord/Nord.java index 1f2c6ea..1dbd981 100644 --- a/src/main/java/com/arcticicestudio/nord/Nord.java +++ b/src/main/java/com/arcticicestudio/nord/Nord.java @@ -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 development@arcticicestudio.com + @@ -16,8 +15,14 @@ copyright Copyright (C) 2016 + import java.util.regex.Pattern; /** - * Public API entry point of the Nord - Java project, which - * implements the Nord 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. + *

+ * Public API entry point of the Nord Java project, which + * implements the 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}. - *
+ * 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}. + *

+ *

*/ 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}. - *
+ * 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}. + *

+ *

*/ 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}. - *
+ * 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}. + *

+ *

*/ 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}. - *
+ * 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}. + *

+ *

*/ 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}. - *
+ * 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}. + *

+ *

*/ 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}. - *
+ * 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}. + *

+ *

*/ 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}. - *
+ * 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}. + *

+ *

*/ 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}. - *
+ * 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}. + *

+ *

*/ 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}. - *
+ * 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}. + *

+ *

*/ 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}. - *
+ * 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}. + *

+ *

*/ 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}. - *
+ * 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}. + *

+ *

*/ 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}. - *
+ * 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}. + *

+ *

*/ 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}. - *
+ * 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}. + *

+ *

*/ 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}. - *
+ * 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}. + *

+ *

*/ 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}. - *
+ * 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}. + *

+ *

*/ 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,9 +213,9 @@ 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) { @@ -203,9 +223,9 @@ public static String hex(final Color color) { } /** - * 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 */ diff --git a/src/main/java/com/arcticicestudio/nord/package-info.java b/src/main/java/com/arcticicestudio/nord/package-info.java index b143b3d..d8a445e 100644 --- a/src/main/java/com/arcticicestudio/nord/package-info.java +++ b/src/main/java/com/arcticicestudio/nord/package-info.java @@ -2,7 +2,6 @@ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ title Nord API Package Info + project nord-java + -version 0.1.0 + repository https://github.com/arcticicestudio/nord-java + author Arctic Ice Studio + email development@arcticicestudio.com + @@ -10,16 +9,13 @@ copyright Copyright (C) 2016 + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ /** - * Public API of the Nord - Java project, which implements + * Public API of the Nord Java project, which implements * the Nord color palette. * *

- * The main entry point of the API is the {@link com.arcticicestudio.nord.Nord} enum. - *

+ * The public API entry point is the {@link com.arcticicestudio.nord.Nord} enum. * * @author Arctic Ice Studio <development@arcticicestudio.com> - * @see Nord - Java - * @see Nord * @version 0.1.0 * @since 0.1.0 */ diff --git a/src/test/java/com/arcticicestudio/nord/NordTest.java b/src/test/java/com/arcticicestudio/nord/NordTest.java index 5ceab22..5651072 100644 --- a/src/test/java/com/arcticicestudio/nord/NordTest.java +++ b/src/test/java/com/arcticicestudio/nord/NordTest.java @@ -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 development@arcticicestudio.com + @@ -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 <development@arcticicestudio.com> - * @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"); } }