-
-
Notifications
You must be signed in to change notification settings - Fork 934
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
faker.internet.color -> faker.color.? #1959
Comments
Just a random thought for "internet css colors" |
without reading the code, i would never have guessed the current implementation. |
TBH, I don't see a problem here. I dont think we need to change anything. The If you now think about a color in the internet (from a dev perspective) - CSS is the first thing that comes to my mind. |
Good thing we have documentation, so you don't need to read the source code :) |
Team Decision We will try to merge the color function with |
this seems logical, it could be an option for faker.color.rgb to make "nice" colors. Also TBH if you want "nice" colors nowadays it's way easier to not use RGB but another color space like HSB or HSL, because you can fix the saturation and brightness/lightness and just change the hue, and you get nice matching colors. |
So you mean we can just deprecate the |
Not quite because the faker.color.* etc don't have a way to supply a base color. So I guess that would be needed first. |
For reference, some example colors for faker.internet.color (with and without a base color) vs faker.color.rgb: https://stackblitz.com/edit/faker-js-demo-861y3v whether its "aethetically pleasing" is a matter of opinion :) |
Should we port the base color feature over, or should we just deprecate the old method? Usage: If we do port the feature over, we should probably define it as:
instead of the current |
faker.internet.color
is a bit of an oddity in thefaker.internet
module which "Generates a random css hex color code in aesthetically pleasing color palette."Deprecate and move to...
faker.color.internet
?faker.color.rgbFromBase
?The text was updated successfully, but these errors were encountered: