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

Exposing functions to convert from RGB to HEX etc. #347

Open
MelanieW97 opened this issue Nov 27, 2023 · 0 comments
Open

Exposing functions to convert from RGB to HEX etc. #347

MelanieW97 opened this issue Nov 27, 2023 · 0 comments

Comments

@MelanieW97
Copy link

MelanieW97 commented Nov 27, 2023

Hey,

there must be some kind fo logic in your code to convert the RGB values to HEX and so on. Would it be possible to expose these functions for further use?

I want the user to be able to use the input as RGB, HEX, ... I don't mind.
However, I need to convert the values to HEX when saving.
It'd be nice to use the same functions since that should be less error-prone.

I can only find some of these functions:

  • cmykToRgb
  • hsla2hsva
  • hsva2hsla
  • hsvaToRgba
  • rgbaToCmyk
  • rgbaToHex
  • rgbaToHsva
  • stringToHsva

There's only a function to convert rgba directly to hex.
Or do you convert the color value to other values as well before you convert to hex? In that case, I can just do it the same way. I was just wondering if some functions are not being exported.

Thanks in advance. :)

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

1 participant