Support

Account

Home Forums Front-end Issues Convert HEX value to HSV Reply To: Convert HEX value to HSV

  • Output: echo "hsv({$hsv[0]},{$hsv[1]},{$hsv[2]})";

    If you don’t need the decimal, you can use the below:

    $hsv_r = (int)$hsv[0];
    $hsv_g = (int)$hsv[1];
    $hsv_b = (int)$hsv[2];
    echo "hsv({$hsv_r},{$hsv_g},{$hsv_b})";