Output Color

Loading… Please Wait

About HSV to RGB Converter

Input an HSV value like 180deg, 100%, 100% and Diversify India’s HSV to RGB converter will convert this value to an RGB color like rgb(0, 255, 255).

HSV color parameters are hue, saturation, and value. The output RGB color parameters are red, green, and blue.

Why Convert HSV to RGB?

Converting HSV to RGB is useful for digital applications where colors are manipulated based on their hue, saturation, and value, but need to be displayed on screens that use red, green, and blue light. HSV is often preferred for color selection and manipulation in graphic design, while RGB is the standard for digital displays.

How to Convert HSV to RGB

To convert HSV to RGB, you need to transform the hue, saturation, and value components into red, green, and blue components.

  1. Extract the values for Hue (H), Saturation (S), and Value (V) from the HSV code.
    • Example: 220deg, 80%, 70% gives H = 220, S = 80%, V = 70%.
  2. Convert the value and saturation values to a range of 0 to 1 by dividing by 100.
    • S = 80% / 100 = 0.8
    • V = 70% / 100 = 0.7
  3. Calculate Chroma (C):
    • C = V × S
    • Example: C = 0.7 × 0.8 = 0.56
  4. Calculate the intermediary value (X) based on the hue (H) value.
    • X = C × (1 – ∣(H/60) % 2 – 1∣)
    • Example: X = 0.56 × (1 – ∣(220/60) % 2 – 1∣) = 0.19
  5. Calculate the match value (M):
    • M = V – C
    • Example: M = 0.7 – 0.56 = 0.14
  6. Calculate the red (R), green (G), and blue (B) components based on the hue (H) value.
    • For 0 ≤ 𝐻 <60: (𝑅, 𝐺, 𝐵) = (𝐶, 𝑋, 0)
    • For 60 ≤ 𝐻 < 120: (𝑅, 𝐺, 𝐵) = (𝑋, 𝐶, 0)
    • For 120 ≤ 𝐻 <180: (𝑅, 𝐺, 𝐵) = (0, 𝐶, 𝑋)
    • For 180 ≤ 𝐻 < 240: (𝑅, 𝐺, 𝐵) = (0, 𝑋, 𝐶)
    • For 240 ≤ 𝐻 < 300: (𝑅, 𝐺, 𝐵) = (𝑋, 0, 𝐶)
    • For 300 ≤ 𝐻 < 360: (𝑅, 𝐺, 𝐵) = (𝐶, 0, 𝑋)
    • Example: Since H = 220, 𝑅 = 0, 𝐺 = 0.19, 𝐵 = 0.56
  7. Convert the preliminary RGB values to the final RGB values by adding the match value (M):
    • R = R + M
    • G = G + M
    • B = B + M
    • Example: 𝑅 = 0 + 0.14 = 0.14, 𝐺 = 0.19 + 0.14 = 0.33, 𝐵 = 0.56 + 0.14 = 0.7
  8. Convert the RGB values to a range of 0 to 255 by multiplying by 255.
    • 𝑅 = 0.14 × 255 ≈ 36
    • 𝐺 = 0.33 × 255 ≈ 84
    • 𝐵 = 0.7 × 255 ≈ 179
  9. Combine the RGB values:
    • Example: rgb(36, 84, 179)

List of Color Tools