Hacker News new | ask | show | jobs
by solasluaith 1410 days ago
I was not aware of the new algorithm, thanks for bringing that up!

Meeting the minimum values for body text in this new standard is unfortunately straight up impossible if you want to maintain uniform chroma for the syntax colouring as the contrast requirements are simply too strict and the sRGB colour space too small. I’ll try to read through all the justifications at some point and aim to meet their goals as best as possible once I understand them.

Luckily the high contrast version is already very close to meeting the standard for fluent text and also has maximum chroma so at least there’s already a version that’s at least usable under these guidelines.

The tool you linked is great and honestly if it would be updated to use OKLab instead of CIELab and allowed for additional constraints, would make my efforts obsolete. As it is, they are using maximum chroma per hue and non-uniform hue differences (plus CIELab has hue prediction errors in the first place).

1 comments

You can use OKLch and APCA with that huetone website. See the gear icon in top right.

I don't think your efforts are obsolete though, the 2 approaches could be combined IIUC your approach is based on computing values based on color science, and the tool/website is a more visual approach, it won't design the colorscheme for you, but you can use it to validate the colorscheme, or tweak it after the fact.

Oh awesome! I didn’t have time to look that deep into it, sorry for missing that part.

Switching to OKLab actually reveals how narrow the bands of available colours can be in the different dimensions and how difficult it would probably be to hand-pick the colours that I’ve chosen. I agree now that they’re probably more complementary.

It would be awesome if the tool allowed you to set constraints like the ones I used.

Not my project, but the source code seems to be here https://github.com/ardov/huetone

If it seems useful to you try reaching out to them on a GitHub issue and see whether they'd be willing to implement the missing features or collaborate with you in another way.

Already on my rapidly growing to do list!