Releases: rocketbase-io/colors
Releases · rocketbase-io/colors
Release list
1.0.0
Two new palettes, three more color spaces, and four bugs that had been in hex2rgb and friends since the start. Breaking on both the jdk and the color values — details at the bottom.
new
TailwindPalette— 26 families × 11 shades (286 colors), stored in the oklch values Tailwind 4.3.3 defines them inOpenColorPalette— 13 families × 10 shades (130 colors), Open Color 1.9.1Shadeenum with ranges:lights(),mids(),darks(),range(from, to)— these also driverandomShade(...)ColorCodeinterface shared by all three palettes, sogetRgbColor(), the contrast helpers andgetNearest()work the same everywhereHslColor,OklchColorandOklabColor, plusRgbColor.readColor(...)which takes hex,rgb(),hsl()oroklch()- docs with every color as a swatch: https://colors.rocketbase.io
fixed
hex2rgbread a single character per channel on six-digit codes and multiplied it by 17, so only repeating pairs like#ffffffcame out right —#123456returned (17, 51, 85) instead of (18, 52, 86)getHexCode()doubled single-digit channels instead of zero-padding them:RgbColor(5, 10, 15)rendered as55aaff, now050a0fhex2rgbreturnsnullon invalid hex instead of throwingNumberFormatExceptionColorPalette.getRandomValue(Collection)had its loop condition inverted — it only returned colors already in the collection, and spun forever on an empty one
breaking
- jdk-11 baseline, the artifact no longer loads on java 8
- every
ColorPaletteconstant is a six-digit hex, so the parsing fix shiftsgetNearest()and both contrast algorithms getNearest()now measures distance in oklab, which matches perceived similarity and gives different answers than the old rgb distance
Build moved from travis to github actions, release now goes through sonatype central publishing. Dependencies: junit 5.14.4, hamcrest 3.0, lombok 1.18.46.