pic
back
back
  

Example 1

picture

Globals/Variables tab


Main colors (Input)
First we have to define our colors in the global tab.
This color scheme is actually based on three colors and black for the text. picture

Image // ===================================
//Colors to define
// ===================================

//Background color_main change only the $rgb values
$set_global(background_color_1,$put(bg_color_1,$rgb(208,247,176)))
//Background color Album column
$set_global(background_color_2,$put(bg_color_2,$rgb(175,231,111)))
//Frame,playing color
$set_global(frame_color,$put(fr_color,$rgb(224,119,111)))
Image
Image Image
Subcolors
Then we must define the subcolors for alternate stripes. It becomes more tricky. I will put one version, simplified but only to darken colors with a fixed value, the other with the ability to lighten or darken colors changing only one thing.

In the blend function, note that I use 5 as blending value. It's not a field and will never be equal to zero, but blend colors anyway. Changing "5" as blending value or "100" as total can change how your colors will be blended, change these values if it does not fit you.
Basic
Image // ===================================
//Subcolors
// ===================================

//subcolors for alternate stripes, I darken colors but you can lighten them changing
//$rgb(0,0,0) to $rgb(255,255,255)
$set_global(subcolor_1,$blend($get(bg_color_1),$rgb(0,0,0),5,100))
$set_global(subcolor_2$blend($get(bg_color_2),$rgb(0,0,0),5,100))
//Subcolor for the background of selected text
$set_global(bg_selected,$blend($get(bg_color_2),$rgb(0,0,0),30,100))
Image
Image Image

More complex
If the theme is light, I darken colors, else I lighten them. In fact I only change the blending color depending on the value of "isdark". It may seem useless, but it earns time if you change the kind of your color scheme.
Image //Choose if your theme is "dark" or "light"
//0 if light, 1 if dark

$puts(isdark,0)

// ===================================
//Subcolors
// ===================================

//Defines the blending color
$puts(blend_color,$ifequal($get(isdark),0,$rgb(0,0,0),$rgb(255,255,255)))
//subcolors for alternate stripes
$set_global(subcolor_1,$blend($get(bg_color_1),$get(blend_color),5,100))
$set_global(subcolor_2,$blend($get(bg_color_2),$get(blend_color),5,100))
//Subcolor for the background of selected text
$set_global(bg_selected,$blend($get(bg_color_2),$get(blend_color),30,100))
Image
Image Image
Final script
Well it's time to put everything together. I have put all inputs at the beginning and the real script at the bottom as it is easier to set variables at the beginning and then let the program do the rest than finding where there are inputs that we must change.
Image // ===================================
//Colors to define
// ===================================

//Choose if your theme is "dark" or "light" 0 if light, 1 if dark
$puts(isdark,0)
//Background color_main
$set_global(background_color_1,$put(bg_color_1,$rgb(208,247,176)))
//Background color Album column
$set_global(background_color_2,$put(bg_color_2,$rgb(175,231,111)))
//Frame,playing color
$set_global(frame_color,$put(fr_color,$rgb(224,119,111)))
// ===================================
//Subcolors
// ===================================

//Defines the blending color
$puts(blend_color,$ifequal($get(isdark),0,$rgb(0,0,0),$rgb(255,255,255)))
//subcolors for alternate stripes
$set_global(subcolor_1,$blend($get(bg_color_1),$get(blend_color),5,100))
$set_global(subcolor_2,$blend($get(bg_color_2),$get(blend_color),5,100))
//Subcolor for the background of selected text
$set_global(bg_selected,$blend($get(bg_color_2),$get(blend_color),30,100))
Image
Image Image

Globals/Style tab

Well now, we have our colors, but we have to define our base.

Text
I don't want to change the text color when the line is selected. So it's quite easy.

Image $set_style(text,$get_global(text_color),$get_global(text_color)) Image
Image Image
Background
More tricky, if the file is playing, I want to make the background to switch gradually between color 2 and color 3. picture
picture

I use the $mod function to compute a number between 0 and 30, then the $blend function makes the rest.

To create alternate stripes, I use the function $mod to get 0 or 1and according to the number given with $ifequal I alternate stripes

Image $set_style(back,
$if(%isplaying%,
//color of the playing file
$blend($get_global(frame_color),$get_global(background_color_2),$mod( %playback_time_seconds%,30),15),
//alternate stripes for non-playing items
$ifequal($mod( %playlist_number%,2),1,$get_global(subcolor_1),$get_global(background_color_1))
),
//selected color
$get_global(bg_selected)
)
Image
Image Image
Frames
I want a frame on the left to delimit columns and a frame at the top of each track with 1 as tracknumber

Image //$set_style(frame-top,$ifequal(%tracknumber%,1,1,0),$get_global(frame_color)) also works
$set_style(frame-top,$select(%tracknumber%,1),$get_global(frame_color))
$set_style(frame-left,1,$get_global(frame_color))
Image
Image Image
Final script
Image $set_style(text,$get_global(text_color),$get_global(text_color))
$set_style(back,
$if(%isplaying%,
//color of the playing file
$blend($get_global(frame_color),$get_global(background_color_2),$mod( %playback_time_seconds%,30),15),
//alternate stripes for non-playing items
$ifequal($mod(%playlist_number%,2),1,$get_global(subcolor_1),$get_global(background_color_1))
),
//selected color
$get_global(bg_selected))
$set_style(frame-top,$select(%tracknumber%,1),$get_global(frame_color))
$set_style(frame-left,1,$get_global(frame_color))
Image
Image Image

Album column style

Check Use custom style spec in the corresponding column first. That's the big part. I use the global style scheme but with two changes, the background color used and if the tracknumber is 1 or 2 the color is different. (Moreover, I add a frame at the top of the third line)

Text
Image $set_style(text,$get_global(text_color),$get_global(text_color)) Image
Image Image
Frames
I want a frame on the left to delimit columns and a frame at the top of each track with 1 or 3 as tracknumber

I use a a frame at the top of the third track rather than at the bottom of the second track as for singles with only two tracks, it would make something ugly:
picture

Image $set_style(frame-top,$select(%tracknumber%,1,0,1),$get_global(frame_color))
$set_style(frame-left,1,$get_global(frame_color))
Image
Image Image
Background
First, If the file is playing, I use the same as in the global/style tab. Then if the tracknumber is 1 or 2, I use my special background color (actually colors used in the Globals style tab) with alternate stripes and finally I alternate stripes for other tracks.

Image $set_style(back,
$if(%isplaying%,
//Playing color scheme
$blend($get_global(frame_color),$get_global(background_color_2),$mod( %playback_time_seconds%,30),15),
//not playing color scheme
$if($or($strcmp(%tracknumber%,01),$strcmp(%tracknumber%,02)),
//colors for track 1 and 2
$ifequal($mod(%playlist_number%,2),1,$get_global(subcolor_1),$get_global(background_color_1)),
//colors for other tracks
$ifequal($mod(%playlist_number%,2),1,$get_global(subcolor_2),$get_global(background_color_2))
)),
//selected background color
$get_global(bg_selected))
Image
Image Image
Final script
Image $set_style(text,$get_global(text_color),$get_global(text_color))
$set_style(back,
$if(%isplaying%,
//Playing color scheme
$blend($get_global(frame_color),$get_global(background_color_2),$mod( %playback_time_seconds%,30),15),
//not playing color scheme
$if($or($strcmp(%tracknumber%,01),$strcmp(%tracknumber%,02)),
//colors for track 1 and 2
$ifequal($mod(%playlist_number%,2),1,$get_global(subcolor_1),$get_global(background_color_1)),
//colors for other tracks
$ifequal($mod(%playlist_number%,2),1,$get_global(subcolor_2),$get_global(background_color_2))
)),
//selected background color
$get_global(bg_selected))
$set_style(frame-top,$select(%tracknumber%,1,0,1),$get_global(frame_color))
$set_style(frame-left,1,$get_global(frame_color))
Image
Image Image
That's all

Go back to main page

 

August 30 2007 02:10:55.