calculate_dynamic_css_colours
calculate_theme
execute_css_colour_expression
find_theme_dark
find_theme_image_themewizard_preview
find_theme_seed
fix_colour
generate_gradient
generate_logo
generate_recoloured_image
hsv_to_rgb
load_themewizard_params_from_theme
make_theme
parse_css_colour_expression
re_hue_image
rgb_to_hsv
theme_wizard_colours_to_css
theme_wizard_colours_to_sheet
themewizard_script
calculate_dynamic_css_colours(array $colours, \ID_TEXT $source_theme) : array
| package | themewizard |
|---|
arrayMap of colours.
\ID_TEXTThe theme it's being generated from
arrayA pair: extended map of colours, colour expression landscapecalculate_theme(string $seed, \ID_TEXT $source_theme, \ID_TEXT $algorithm, \ID_TEXT $show= 'colours', \?boolean $dark= null, \?array $colours= null, \?array $landscape= null, \?LANGUAGE_NAME $lang= null) : mixed
| package | themewizard |
|---|---|
| set | equations hsv |
stringColour seed.
\ID_TEXTThe theme it's being generated from
\ID_TEXTThe algorithm to use
\ID_TEXTWhat to generate ('colours', or the name of a theme image).
\?booleanWhether it will be a dark theme (null: autodetect).
\?arrayThe colour map to use (null: compute).
\?arrayThe computed colour landscape to use (null: compute).
\?LANGUAGE_NAMEThe language to work in (null: default).
mixedImage resource OR A pair: extended map of colours, colour expression landscapeexecute_css_colour_expression(mixed $expression, array $colours) : \?string
| package | themewizard |
|---|
mixedExpression tree (array) OR leaf (string).
arrayKnown colours at this point.
\?stringRRGGBB colour or possibly just a number (null: answer cannot be computed).find_theme_dark(\ID_TEXT $theme) : boolean
| package | themewizard |
|---|
\ID_TEXTThe theme name
booleanWhether the theme is darkfind_theme_image_themewizard_preview(\ID_TEXT $id, boolean $silent_fail = false) : \?URLPATH
| package | themewizard |
|---|
\ID_TEXTThe theme image ID
booleanWhether to silently fail (i.e. not give out an error message when a theme image cannot be found)
\?URLPATHURL to image (null: use standard one, this one is not theme wizard influenced).find_theme_seed(\ID_TEXT $theme, boolean $no_easy_anchor = false) : \ID_TEXT
| package | themewizard |
|---|
\ID_TEXTThe theme name
booleanWhether we can't assume the theme has any Composr default colour information defined, if not in theme.ini
\ID_TEXTThe seed colourfix_colour(mixed $x, boolean $hue = false) : integer
| package | themewizard |
|---|
mixedColour component (float or integer).
booleanWhether this is hue (meaning it cycles around)
integerConstrained colour component.generate_gradient(string $top, string $bottom) : resource
| package | themewizard |
|---|
stringColour for the top.
stringColour for the bottom.
resourceThe imagegenerate_logo(string $name, string $font_choice= 'Vera', string $logo_theme_image= 'logo/default_logos/1', string $background_theme_image= 'logo/default_backgrounds/banner1', boolean $raw= false, \?string $theme= null, boolean $standalone_version= false) : resource
| package | themewizard |
|---|
stringThe site name.
stringThe font name (in data/fonts).
stringThe logo theme image.
stringThe background theme image.
booleanWhether to output the logo to the browser, destroy then image, and exit the script (i.e. never returns)
\?stringThe theme to use the logo template from (null: default root zone theme).
booleanWhether we are generating the standalone version (smaller, used in e-mails etc).
resourceThe image resource.generate_recoloured_image(mixed $path, string $colour_a_orig, string $colour_a_new, string $colour_b1_orig, string $colour_b1_new, \?string $colour_b2_orig= null, \?string $colour_b2_new= null, string $gradient_direction= 'vertical', \?array $pixel_x_start_array= null, integer $gradient_offset= 0, boolean $end_array= false) : resource
| package | themewizard |
|---|---|
| set | vertical horizontal |
mixedThe image path OR a preloaded GD image resource
stringThe colour code of what we have as our "minor" colour (often a border colour)
stringThe colour code of what we want as our "minor" colour (often a border colour)
stringThe colour code of what we have as our first major colour (often the only major colour)
stringThe colour code of what we want as our first major colour (often the only major colour)
\?stringThe colour code of what we have as our second major colour (the gradient target, at the bottom/right of the image) (null: not gradiented)
\?stringThe colour code of what we want as our second major colour (the gradient target, at the bottom/right of the image) (null: not gradiented)
stringThe directional code for the gradient
\?arrayAn array that is used to limit where we do our conversion on. It specifies, for each y-offset, the x-offset we start from (null: no such limitation)
integerWhat the gradient assumed start-position will be offset by (in the gradient direction).
booleanWhether the pixel_x_start array is actually an end array.
resourceThe imagehsv_to_rgb(float $h, float $s, float $v) : string
| package | themewizard |
|---|
floatH component
floatS component
floatV component
stringRGB colour.load_themewizard_params_from_theme(\ID_TEXT $theme, boolean $guess_images_if_needed = false)
| package | themewizard |
|---|
\ID_TEXTThe theme name
booleanWhether we suspect the theme might not be well defined
make_theme(string $themename, \ID_TEXT $source_theme, \ID_TEXT $algorithm, string $seed, boolean $use, \?boolean $dark= false, boolean $inherit_css= false)
| package | themewizard |
|---|---|
| set | equations hsv |
stringName of the theme.
\ID_TEXTThe theme it's being generated from
\ID_TEXTThe algorithm to use
stringSeed colour to use.
booleanWhether to use the theme immediately.
\?booleanWhether it will be a dark theme (null: autodetect).
booleanWhether to inherit the CSS, for easier theme upgrading.
parse_css_colour_expression(string $textual) : \?array
| package | themewizard |
|---|
stringTextual expression.
\?arrayExpression tree (null: not real).re_hue_image(mixed $path, string $seed, \ID_TEXT $source_theme, boolean $also_s_and_v= false, boolean $invert= false) : resource
| package | themewizard |
|---|
mixedThe image path OR a preloaded GD image resource
stringThe colour code of our hue
\ID_TEXTThe theme this is being generated from
booleanWhether to also adjust the S and V components
booleanWhether to invert the colours
resourceThe imagergb_to_hsv(string $rgb) : array
| package | themewizard |
|---|
stringRRGGBB colour.
arrayTriplet of (0-255) components: H, S, Vtheme_wizard_colours_to_css(string $contents, array $landscape, \ID_TEXT $source_theme, \ID_TEXT $algorithm, \ID_TEXT $seed) : string
| package | themewizard |
|---|---|
| set | equations hsv |
stringCSS to apply to.
arrayThe colour expression landscape which we'll make substitutions using.
\ID_TEXTThe theme this is being generated from
\ID_TEXTThe algorithm to use
\ID_TEXTThe seed colour
stringThe sheettheme_wizard_colours_to_sheet(\ID_TEXT $sheet, array $landscape, \ID_TEXT $source_theme, \ID_TEXT $algorithm, \ID_TEXT $seed) : string
| package | themewizard |
|---|---|
| set | equations hsv |
\ID_TEXTCSS filename of source file.
arrayThe colour expression landscape which we'll make substitutions using.
\ID_TEXTThe theme this is being generated from
\ID_TEXTThe algorithm to use
\ID_TEXTThe seed colour
stringThe sheet