Skip to content

0.8.5 "Mix Things Up"

Latest
Compare
Choose a tag to compare
@tommyettinger tommyettinger released this 12 Oct 00:49

This release mostly changes how SimplePalette.parseDescription() works for all color spaces with a SimplePalette. Now you can specify weights for colors by adding a number after any color name (this can be space-separated as in red 5 blue 2, or can use most punctuation, as in red^5 blue^2). These examples should be exactly equivalent to red red red red red blue blue, but I definitely prefer the way with numbers! Lightness and saturation modifiers also changed how they are evaluated in some places. Lightness changes generally work by lerping towards white or black now, instead of just changing the L component for Oklab and CIELAB, or the I component for IPT_HQ. This seems to produce a meaningful change more often when a color had (in Oklab) an L value that was very close to 1 already, and you wanted to lighten it, such as light yellow. Saturation changes take effect after lightness changes, so even though lightening or darkening makes a color closer to grayscale, you can enrich it to counter that.

The other big change here is that Oklab now calculates lightness extremely closely to how RGB and YCwCm calculate lightness, which had been my goal with the last change to the light adjustment, but I hadn't obtained it until now. It turns out that no complicated formula was needed, and I already essentially had this adjustment done in the Oklab shaders -- now converting to and from Oklab is just equivalent to a Math.pow() call on L (using something like Math.pow(L, 3.0/2.0) to convert to Oklab, or Math.pow(L, 2.0/3.0) to convert from Oklab). In practice, this seems to smooth gradients quite well, and doesn't seem to have much speed difference.

As usual, if you're downloading these via the .JAR files below, you probably shouldn't be, but if you are.... you probably don't need the ones with -pure in the name (plus, those have more dependencies).