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

Simplify RGB to HSV conversion #8432

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Commits on Oct 12, 2024

  1. simplify rgb to hsv conversion

    By inlining some values, the starting hue calculation can be reduced from using three subtractions and two divisions to using one subtraction and one division.
    "fmod(n+1,1)" can be replaced with "n - floor(n)" due to the second parameter being 1.
    The saturation calculation can be done without floating point values.
    The "CLIP8"s are unnecessary because the values are already in the correct range.
    Yay295 committed Oct 12, 2024
    Configuration menu
    Copy the full SHA
    6b8a97a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    48681cd View commit details
    Browse the repository at this point in the history