Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ideas #5

Open
neeasade opened this issue Jan 13, 2021 · 10 comments
Open

ideas #5

neeasade opened this issue Jan 13, 2021 · 10 comments

Comments

@neeasade
Copy link
Owner

neeasade commented Jan 13, 2021

  • an explicit rgb to sRGB conversion function (or gamma correction function)
  • CMYK? Peter's color notes have what he describes as a /very rough/ set of RGB <--> CMYK conversion functions
    • note: CMYK space is smaller than RGB, so would need to be sure to clamp going out
  • munsell color system
  • color mixing by colorspace properties -- you could mix with a percentage value with all or one color property towards another (or average in the middle/mix completely, rather than approach)
  • support RGB colorspace (we just kinda leave everyone to their own devices there rn)
@neeasade
Copy link
Owner Author

neeasade commented Jan 14, 2021

a function that would tell me the resulting color of a top layer color with opacity over a bottom layer color

@neeasade
Copy link
Owner Author

  • color temperature functions
  • color correction functions (I mention gamma correction above, but color correction in general is just a whole nother rabbit hole)

@neeasade
Copy link
Owner Author

peep chroma.js, and this article

@neeasade
Copy link
Owner Author

@neeasade
Copy link
Owner Author

neeasade commented Feb 6, 2021

a version of ct-iterate that "amplifies" a unary transform function when the result is the same (EG, upping the darken color by value until something happens, rather than just assuming the passed transform is enough)

@neeasade
Copy link
Owner Author

neeasade commented Feb 7, 2021

better compensation when tweaking individual properties beyond compatible ranges -- see for example the sliders here https://css.land/lch/ -- you have to raise brightness in order to be able to raise chroma

@neeasade
Copy link
Owner Author

neeasade commented Jun 17, 2022

  • a function that takes in a color and list of colors, returning the color from the list that is closest

^ WONTFIX, currently possible:

(let* ((colors '("#000000" "#888888" "#ffffff"))
        (candidate "#777777"))
  (first
    (seq-sort-by
      (-partial 'ct-distance candidate)
      '< colors)))  ; yields "#888888"

@tadfisher
Copy link

Would love a function to find the closest color at bit-depth d. For example, I often have to find the closest 8-bit terminal color to a 24-bit source color when defining an Emacs color theme.

@neeasade
Copy link
Owner Author

@tadfisher Thanks for the idea! -- in the meantime if you have a known list of colors (eg a list of "8 bit" colors) you can use something like the example I just added here: #5 (comment)

@tadfisher
Copy link

@tadfisher Thanks for the idea! -- in the meantime if you have a known list of colors (eg a list of "8 bit" colors) you can use something like the example I just added here: #5 (comment)

Actually that makes sense; I didn't realize that "256 color" terminals use particular color values instead of a uniform 8-bit distribution. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants