Package rope.colour

Class R_Colour

java.lang.Object
rope.core.Rope
rope.colour.R_Colour
All Implemented Interfaces:
R_Constants, R_Constants_Colour

public class R_Colour extends Rope
  • Constructor Details

    • R_Colour

      public R_Colour(processing.core.PApplet pa)
    • R_Colour

      public R_Colour(processing.core.PApplet pa, int... list_colour)
    • R_Colour

      public R_Colour(processing.core.PApplet pa, String palette_name)
    • R_Colour

      public R_Colour(processing.core.PApplet pa, String palette_name, int... list_colour)
  • Method Details

    • create

      public boolean create(String name)
      create a new empty palette
      Parameters:
      name -
    • create

      public boolean create(String name, processing.core.PImage img, int num)
      Parameters:
      name -
      img -
      num -
      Returns:
    • add

      public void add(int index, int... colour)
    • add

      public void add(String name, int... colour)
      Parameters:
      name - name of the palette, if the palette don't exist a new one is created
      colour - list of int colour must be add to the palette
    • add

      public void add(int... colour)
      Add list of colour to the first palette
      Parameters:
      colour - list of int colour added to first palette.
    • add

      public void add(String name, int colour_ref, int num, int type, float range_x, float range_y, float range_z)
    • add

      public void add(String name, int colour_ref, int num, int type, float range)
    • set

      public void set(String name, int index, int colour)
    • kill

      public void kill()
      remove all palettes
    • clear

      public void clear()
    • clear

      public void clear(String name)
    • remove

      public void remove(String name, int index)
    • size_palette

      public int size_palette()
      Returns:
      the num / quantity of palette vailable
    • size

      public int size()
    • size

      public int size(int group)
    • select

      public int select(String name, int target)
      Parameters:
      name -
      target -
      Returns:
      the selected color and add this one like a current colour
    • rand

      public int rand()
      Returns:
      a random color from random palette and select this one as a current colour
    • rand

      public int rand(String... list_name)
      Parameters:
      list_name - array of pallete name
      Returns:
      a random color from the named palette and select this one as a current colour, if nothing match the value 0 is returned
    • gradient

      public int[] gradient(int colour_a, int colour_b, int num)
    • get_current

      public int get_current()
      GET
    • get_names

      public String[] get_names()
      Returns:
      the list name of palette
    • get

      public int[] get(String name)
      Parameters:
      name - of the colour palette
      Returns:
      the int array colours of this palette
    • get

      public int[] get(int group)
      Parameters:
      group - of the colour palette
      Returns:
      the int array colours of this palette group
    • get

      public int get(String name, int target)
      Parameters:
      name - of the colour palette
      target - target colour rank in the selected palette
      Returns:
    • get_colour

      @Deprecated public int get_colour(String name, int target)
      Deprecated.
      instread use int get(String name, int target);
      Parameters:
      name - of the colour palette
      target - target colour rank in the selected palette
      Returns:
    • get_master

      public int get_master(String name)
    • get_hue

      public float get_hue(String name, int target)
    • get_saturation

      public float get_saturation(String name, int target)
    • get_brightness

      public float get_brightness(String name, int target)
    • get_red

      public float get_red(String name, int target)
    • get_green

      public float get_green(String name, int target)
    • get_blue

      public float get_blue(String name, int target)
    • get_alpha

      public float get_alpha(String name, int target)
    • get_current_hsb

      public vec3 get_current_hsb()
    • get_hsb

      public vec3 get_hsb(String name, int target)
    • get_hsb_impl

      public vec3 get_hsb_impl(int c)
    • get_current_hsba

      public vec4 get_current_hsba()
    • get_hsba

      public vec4 get_hsba(String name, int target)
    • get_hsba_impl

      public vec4 get_hsba_impl(int c)
    • get_current_rgb

      public vec3 get_current_rgb()
    • get_rgb

      public vec3 get_rgb(String name, int target)
    • get_rgb_impl

      public vec3 get_rgb_impl(int c)
    • get_current_rgba

      public vec4 get_current_rgba()
    • get_current_rgba

      public vec4 get_current_rgba(String name, int target)
    • get_current_rgba_impl

      public vec4 get_current_rgba_impl(int c)
    • get

      public int[] get()
      Returns:
      all argument color of all the lists
    • hue

      public float[] hue()
    • saturation

      public float[] saturation()
    • brightness

      public float[] brightness()
    • red

      public float[] red()
    • green

      public float[] green()
    • blue

      public float[] blue()
    • alpha

      public float[] alpha()
    • hsb

      public vec3[] hsb()
    • hsba

      public vec4[] hsba()
    • rgb

      public vec3[] rgb()
    • rgba

      public vec4[] rgba()
    • hue

      public float[] hue(String name)
    • saturation

      public float[] saturation(String name)
    • brightness

      public float[] brightness(String name)
    • red

      public float[] red(String name)
    • green

      public float[] green(String name)
    • blue

      public float[] blue(String name)
    • alpha

      public float[] alpha(String name)
    • hsb

      public vec3[] hsb(String name)
    • rgb

      public vec3[] rgb(String name)
    • hsba

      public vec4[] hsba(String name)
    • rgba

      public vec4[] rgba(String name)