Thread: Color Cycle
View Single Post
  #12  
Old 05-15-2008, 01:35 AM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
Quote:
Originally Posted by zokemon View Post
Seems to only support hue? What about saturation and luminosity?
Added it in for you

Below is an example of hue, saturation and luminosity.
PHP Code:
//#CLIENTSIDE
function onCreated() {
  
this.0.99;
  
this.sat 0;
  
this.mx = {150};
  
temp.= {screenwidth 2screenheight 2};

  
showimg(200"light4.png"200200);
  
changeimgvis(2004);
  
temp.color colorcycle(this.mx[0]);
  
changeimgcolors(200color[0] - color[0] / this.satcolor[1] - color[1] / this.satcolor[2] - color[2] / this.satthis.a);

  
onCreateColor();
  
onTimeout();
}

function 
onCreateColor() {
  new 
GuiWindowCtrl("Color_Window1") {
    
profile GuiBlueWindowProfile;
    
clientrelative true;
    
clientextent "90,164";

    
canmaximize false;
    
canminimize false;
    
canmove true;
    
canresize false;
    
closequery false;
    
destroyonhide false;
    
text "Color";
    
50;
    
50;

    new 
GuiShowImgCtrl("Color_Table") {
      
0;
      
width height 90;
      
image "tig-colortab.png";
    }
    new 
GuiShowImgCtrl("Color_Cursor") {
      
0;
      
image "tig-colorcursor.png";
    }
    new 
GuiSliderCtrl("Color_Slider1") {
      
profile GuiBlueSliderProfile;
      
height 20;
      
range "0,80";
      
ticks 80;
      
value 80;
      
width 77;
      
7;
      
107;
    }
    new 
GuiTextCtrl("Color_Text1") {
      
profile GuiBlueTextProfile;
      
height 20;
      
text "Saturation:";
      
width 52;
      
7;
      
90;
    }
    new 
GuiTextCtrl("Color_Text2") {
      
profile GuiBlueTextProfile;
      
height 20;
      
text "Luminosity:";
      
width 60;
      
10;
      
120;
    }
    new 
GuiSliderCtrl("Color_Slider2") {
      
profile GuiBlueSliderProfile;
      
height 20;
      
range "0,99";
      
ticks 99;
      
value 99;
      
width 77;
      
7;
      
141;
    }
  }
}

function 
Color_Slider2.onReleaseSlider(value) {
  
this.value 100;
  
temp.color colorcycle(this.mx[0]);
  
changeimgcolors(200color[0] - color[0] / this.satcolor[1] - color[1] / this.satcolor[2] - color[2] / this.satthis.a);
}

function 
Color_Slider1.onReleaseSlider(value) {
  
this.sat abs(value 100);
  
temp.color colorcycle(this.mx[0]);
  
changeimgcolors(200color[0] - color[0] / this.satcolor[1] - color[1] / this.satcolor[2] - color[2] / this.satthis.a);
}

function 
onTimeout() {
  if (
leftmousebuttonglobal) {
    if (
mousescreenx in |Color_Window1.6Color_Window1.Color_Table.width 7| &&
      
mousescreeny in |Color_Window1.24Color_Window1.115|) {
      
this.mx Color_Table.globaltolocalcoord({mousescreenxmousescreeny});
      
Color_Cursor.this.mx[0] - 6;
      
Color_Cursor.this.mx[1] - 6;
      
temp.color colorcycle(this.mx[0]);
      
changeimgcolors(200color[0] - color[0] / this.satcolor[1] - color[1] / this.satcolor[2] - color[2] / this.satthis.a);
    }
  }
  
setTimer(0.05);

__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote