Giter Site home page Giter Site logo

dokozero / okcolor Goto Github PK

View Code? Open in Web Editor NEW
54.0 2.0 2.0 5.33 MB

Figma plugin for advanced color picking, with OkLCH, APCA, WCAG and more.

Home Page: https://www.figma.com/community/plugin/1173638098109123591/OkColor

License: MIT License

HTML 0.09% CSS 4.47% TypeScript 59.17% JavaScript 31.73% GLSL 4.54%
color color-palette figma color-picker contrast hsb hsl okhsl okhsv oklch

okcolor's Issues

LCH values accuracy

Hi there! Thank you for the plugin 🙌

I noticed that lch.oklch.com and the okColor plugin show really different values for the LCH color mode. E. g. 105 and 26.3 for Chroma.
image

What could be the reason?

OKLrCH for better Lightness?

Hi,

I'd like to suggest implementing OkLrCH space instead of the current OkLCH for more perceptually uniform lightness.
Björn used it in one of these color pickers: https://bottosson.github.io/misc/colorpicker

Middle gray in OkColor is currently #636363, which is darker than the supposed #777777

Also, OkLCH suffers from an extension of dark values near Black, as you can see from this post:
https://raphlinus.github.io/color/2021/01/18/oklab-critique.html
which makes the interpolation from any light colors to black not very uniform.

I hope you will consider this in the next update.
Thank you for such a great plugin!

Cheers,
Alex

WebGL sRGB rendering bug in Chrome and Safari

Hello @freydev I'm going to need your help again.

I just released a new version and found a bug in OkLCH's render, I'm not sure if it was there before when we released version 5, maybe Chrome changed something meanwhile in their WebGL engine.

On Chrome and Safari (macOS)
chrome-safari

On Figma desktop, Firefox and Edge (macOS)
figma-desktop-firefox-edge

I reverted the update to see if it was present on the last release (5), tested on Chrome and yes, same weird bug:
version5-chrome

It only happens in sRGB, P3 is fine, here is a capture from Chrome:
chrome-safari-p3

I looked into the code, especially in f_shader.glsl but I'm not that familiar with WebGL, If you know where it can come from that would be helpful (you'll see that I refactored the whole code and it's now easier to read 👍).

If you need to push a new test version in prod tell me as we can't test dev version in Chrome but only in desktop app which is a shame to debug 😔 . Thanks in advance for your time.

The field order for OKLCH

Hey! Thanks for the update that brings P3. I’m continuing to test it, but at first glance, it looks great!

Every time I use the plugin, I have to wrap my head around this control.

image

The order here is H, C, and L. This order contradicts the parameter order in the CSS notation and even the space name: LCH.

I would suggest changing the field order according to the selected color space. So it would be H, S, L for HSL, and L, C, H for OKLCH.

Chroma value formatting

The Chroma value looks confusing, because it’s actually 0.319.

image

Is there a strong reason to format it as 31.9?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.