Tetrapod Project
hsvrgb.h File Reference
#include <iostream>
#include <cstdlib>
#include <cmath>
Include dependency graph for hsvrgb.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void RGBtoHSV (double &fR, double &fG, double fB, double &fH, double &fS, double &fV)
 Convert RGB to HSV color space. More...
 
void HSVtoRGB (double &fR, double &fG, double &fB, double &fH, double &fS, double &fV)
 Convert HSV to RGB color space. More...
 

Function Documentation

◆ RGBtoHSV()

void RGBtoHSV ( double &  fR,
double &  fG,
double  fB,
double &  fH,
double &  fS,
double &  fV 
)

Convert RGB to HSV color space.

Converts a given set of RGB values ‘r’, ‘g’, ‘b’ into HSV coordinates. The input RGB values are in the range [0, 1], and the output HSV values are in the ranges h = [0, 360], and s, v = [0, 1], respectively.

Parameters
fRRed component, used as input, range: [0, 1]
fGGreen component, used as input, range: [0, 1]
fBBlue component, used as input, range: [0, 1]
fHHue component, used as output, range: [0, 360]
fSHue component, used as output, range: [0, 1]
fVHue component, used as output, range: [0, 1]

Definition at line 49 of file hsvrgb.cpp.

◆ HSVtoRGB()

void HSVtoRGB ( double &  fR,
double &  fG,
double &  fB,
double &  fH,
double &  fS,
double &  fV 
)

Convert HSV to RGB color space.

Converts a given set of HSV values ‘h’, ‘s’, ‘v’ into RGB coordinates. The output RGB values are in the range [0, 1], and the input HSV values are in the ranges h = [0, 360], and s, v = [0, 1], respectively.

Parameters
fRRed component, used as output, range: [0, 1]
fGGreen component, used as output, range: [0, 1]
fBBlue component, used as output, range: [0, 1]
fHHue component, used as input, range: [0, 360]
fSHue component, used as input, range: [0, 1]
fVHue component, used as input, range: [0, 1]

Definition at line 96 of file hsvrgb.cpp.