GSDP:GAM100/CProcessing/colorHSV()

From Inside
Jump to: navigation, search

colorHSV()

Description

Create a PColorHSV object from given hsva values.

Parameters

colorHSV(int h, int s, int v, int a)

  • h - (int) The hue of the color. Range of 0-360
  • s - (int) The saturation of the color. Range of 0-100.
  • v - (int) The value of the color. Range of 0-100.
  • a - (int) the alpha of the color. Range of 0-255.

Example

void init()
{
  size(400, 400);
  rectMode(CORNER);
}

void update()
{
  background(color(0, 0, 0, 255));
  PColorHSV hsv = colorHSV((frameCount * 3) % 360, 100, 50, 255);
  fill(hsv2rgb(hsv));
  rectRounded(10, 10, 380, 380, 20);
}

Related

Personal tools
Namespaces

Variants
Actions
Navigation
NameSpaces:>
Tools
Dynamic:>