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

make better assumptions about new color positions in a gradient #317

Open
KrabCode opened this issue Aug 27, 2024 · 0 comments
Open

make better assumptions about new color positions in a gradient #317

KrabCode opened this issue Aug 27, 2024 · 0 comments

Comments

@KrabCode
Copy link
Owner

KrabCode commented Aug 27, 2024

when setting 3 colors as defaults with

gui.gradient("path",
        gui.colorPoint(color(255,0,0), 0),
        gui.colorPoint(color(0,255,0), 0.5f),
        gui.colorPoint(color(0,0,255), 1)
);

adding a new color at runtime with the "stops" slider sets its position to around 0.5 - it should probably add it at the end, either copy or go further towards 1 than the last position on the existing list

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