| Current Path : /home/w/u/e/wuectly/www/03cbe/ |
| Current File : /home/w/u/e/wuectly/www/03cbe/color.zip |
PK K�!]�2Hq
q
simple.phpnu &1i� <?php
/**
* @package Joomla.Site
* @subpackage Layout
*
* @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
extract($displayData);
/**
* Layout variables
* -----------------
* @var string $autocomplete Autocomplete attribute for the field.
* @var boolean $autofocus Is autofocus enabled?
* @var string $class Classes for the input.
* @var string $description Description of the field.
* @var boolean $disabled Is this field disabled?
* @var string $group Group the field belongs to. <fields> section in form XML.
* @var boolean $hidden Is this field hidden in the form?
* @var string $hint Placeholder for the field.
* @var string $id DOM id of the field.
* @var string $label Label of the field.
* @var string $labelclass Classes to apply to the label.
* @var boolean $multiple Does this field support multiple values?
* @var string $name Name of the input field.
* @var string $onchange Onchange attribute for the field.
* @var string $onclick Onclick attribute for the field.
* @var string $pattern Pattern (Reg Ex) of value of the form field.
* @var boolean $readonly Is this field read only?
* @var boolean $repeat Allows extensions to duplicate elements.
* @var boolean $required Is this field required?
* @var integer $size Size attribute of the input.
* @var boolean $spellchec Spellcheck state for the form field.
* @var string $validate Validation rules to apply.
* @var string $value Value attribute of the field.
* @var array $checkedOptions Options that will be set as checked.
* @var boolean $hasValue Has this field a value assigned?
* @var array $options Options available for this field.
* @var array $checked Is this field checked?
* @var array $position Is this field checked?
* @var array $control Is this field checked?
*/
$class = ' class="' . trim('simplecolors chzn-done ' . $class) . '"';
$disabled = $disabled ? ' disabled' : '';
$readonly = $readonly ? ' readonly' : '';
// Include jQuery
JHtml::_('jquery.framework');
JHtml::_('script', 'system/html5fallback.js', array('version' => 'auto', 'relative' => true, 'conditional' => 'lt IE 9'));
JHtml::_('script', 'jui/jquery.simplecolors.min.js', array('version' => 'auto', 'relative' => true));
JHtml::_('stylesheet', 'jui/jquery.simplecolors.css', array('version' => 'auto', 'relative' => true));
JHtml::_('script', 'system/color-field-init.min.js', array('version' => 'auto', 'relative' => true));
?>
<select data-chosen="true" name="<?php echo $name; ?>" id="<?php echo $id; ?>"<?php
echo $disabled; ?><?php echo $readonly; ?><?php echo $required; ?><?php echo $class; ?><?php echo $position; ?><?php
echo $onchange; ?><?php echo $autofocus; ?> style="visibility:hidden;width:22px;height:1px">
<?php foreach ($colors as $i => $c) : ?>
<option<?php echo ($c == $color ? ' selected="selected"' : ''); ?>><?php echo $c; ?></option>
<?php if (($i + 1) % $split == 0) : ?>
<option>-</option>
<?php endif; ?>
<?php endforeach; ?>
</select>
PK K�!]�ϻ�� � advanced.phpnu &1i� <?php
/**
* @package Joomla.Site
* @subpackage Layout
*
* @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
extract($displayData);
/**
* Layout variables
* -----------------
* @var string $autocomplete Autocomplete attribute for the field.
* @var boolean $autofocus Is autofocus enabled?
* @var string $class Classes for the input.
* @var string $description Description of the field.
* @var boolean $disabled Is this field disabled?
* @var string $group Group the field belongs to. <fields> section in form XML.
* @var boolean $hidden Is this field hidden in the form?
* @var string $hint Placeholder for the field.
* @var string $id DOM id of the field.
* @var string $label Label of the field.
* @var string $labelclass Classes to apply to the label.
* @var boolean $multiple Does this field support multiple values?
* @var string $name Name of the input field.
* @var string $onchange Onchange attribute for the field.
* @var string $onclick Onclick attribute for the field.
* @var string $pattern Pattern (Reg Ex) of value of the form field.
* @var boolean $readonly Is this field read only?
* @var boolean $repeat Allows extensions to duplicate elements.
* @var boolean $required Is this field required?
* @var integer $size Size attribute of the input.
* @var boolean $spellchec Spellcheck state for the form field.
* @var string $validate Validation rules to apply.
* @var string $value Value attribute of the field.
* @var array $checkedOptions Options that will be set as checked.
* @var boolean $hasValue Has this field a value assigned?
* @var array $options Options available for this field.
* @var array $checked Is this field checked?
* @var array $position Is this field checked?
* @var array $control Is this field checked?
*/
if ($validate !== 'color' && in_array($format, array('rgb', 'rgba'), true))
{
$alpha = ($format === 'rgba');
$placeholder = $alpha ? 'rgba(0, 0, 0, 0.5)' : 'rgb(0, 0, 0)';
}
else
{
$placeholder = '#rrggbb';
}
$inputclass = ($keywords && ! in_array($format, array('rgb', 'rgba'), true)) ? ' keywords' : ' ' . $format;
$class = ' class="' . trim('minicolors ' . $class) . ($validate === 'color' ? '' : $inputclass) . '"';
$control = $control ? ' data-control="' . $control . '"' : '';
$format = $format ? ' data-format="' . $format . '"' : '';
$keywords = $keywords ? ' data-keywords="' . $keywords . '"' : '';
$validate = $validate ? ' data-validate="' . $validate . '"' : '';
$disabled = $disabled ? ' disabled' : '';
$readonly = $readonly ? ' readonly' : '';
$hint = strlen($hint) ? ' placeholder="' . $this->escape($hint) . '"' : ' placeholder="' . $placeholder . '"';
$autocomplete = ! $autocomplete ? ' autocomplete="off"' : '';
// Force LTR input value in RTL, due to display issues with rgba/hex colors
$direction = $lang->isRtl() ? ' dir="ltr" style="text-align:right"' : '';
// Including fallback code for HTML5 non supported browsers.
JHtml::_('jquery.framework');
JHtml::_('script', 'system/html5fallback.js', array('version' => 'auto', 'relative' => true, 'conditional' => 'lt IE 9'));
JHtml::_('script', 'jui/jquery.minicolors.min.js', array('version' => 'auto', 'relative' => true));
JHtml::_('stylesheet', 'jui/jquery.minicolors.css', array('version' => 'auto', 'relative' => true));
JHtml::_('script', 'system/color-field-adv-init.min.js', array('version' => 'auto', 'relative' => true));
?>
<input type="text" name="<?php echo $name; ?>" id="<?php echo $id; ?>" value="<?php echo $this->escape($color); ?>"<?php
echo $hint,
$class,
$position,
$control,
$readonly,
$disabled,
$required,
$onchange,
$autocomplete,
$autofocus,
$format,
$keywords,
$direction,
$validate;
?>/>
PK lA"]����
�
color.phpnu &1i� <?php
/**
*------------------------------------------------------------------------------
* iC Library - Library by Jooml!C, for Joomla!
*------------------------------------------------------------------------------
* @package iC Library
* @subpackage color
* @copyright Copyright (c)2014-2015 Cyril Rezé, Jooml!C - All rights reserved
*
* @license GNU General Public License version 3 or later; see LICENSE.txt
* @author Cyril Rezé (Lyr!C)
* @link http://www.joomlic.com
*
* @version 1.0.0 2014-05-10
* @since 1.0.0
*------------------------------------------------------------------------------
*/
// No direct access to this file
defined('_JEXEC') or die();
/**
* class iCColor
*/
class iCColor
{
/**
* Function to convert color : hexadecimal to RGB
*
* @access public static
* @param color to be converted in hexadecimal ('#xxxxxx')
* @return converted color in RGB ('xxx,xxx,xxx')
*
* @since 1.0.0
*/
static public function hex_to_rgb($color)
{
if (!is_array($color)
&& preg_match("/^[#]([0-9a-fA-F]{6})$/",$color))
{
$hex_R = substr($color,1,2);
$hex_G = substr($color,3,2);
$hex_B = substr($color,5,2);
$RGB = hexdec($hex_R).",".hexdec($hex_G).",".hexdec($hex_B);
return $RGB;
}
else
{
return false;
}
}
/**
* Function to convert color : RGB to hexadecimal
*
* @access public static
* @param color to be converted in RGB ('xxx,xxx,xxx' or 'array(xxx,xxx,xxx)')
* @return converted color in hexadecimal ('#xxxxxx')
*
* @since 1.0.0
*/
static public function rgb_to_hex($color)
{
if (!is_array($color))
{
$color_array = explode(",", $color);
}
if (is_array($color_array) and count($color_array) === 3)
{
$hex_RGB = "";
foreach ($color_array as $value)
{
$hex_value = dechex($value);
if (strlen($hex_value) < 2)
{
$hex_value = "0".$hex_value;
}
$hex_RGB.=$hex_value;
}
return "#".$hex_RGB;
}
else
{
return false;
}
}
/**
* Function to get brightness of hexadecimal color
*
* @access public static
* @param color in hexadecimal ('#xxxxxx')
* @return string ('dark' or 'bright')
*
* @since 1.0.0
*/
static public function getBrightness($color)
{
if (!is_array($color)
&& preg_match("/^[#]([0-9a-fA-F]{6})$/",$color)
&& strlen($color) == 7)
{
$get_RGB = iCColor::hex_to_rgb($color);
$RGB = explode(",",$get_RGB);
$RGBa = $RGB[0];
$RGBb = $RGB[1];
$RGBc = $RGB[2];
$sum = ($RGBa + $RGBb + $RGBc);
if ($sum > '384') // Color is bright
{
$brightness = 'bright';
}
else // Color is dark
{
$brightness = 'dark';
}
return $brightness;
}
else
{
return false;
}
}
}
PK lA"]�V�
index.htmlnu &1i� <!DOCTYPE html><title></title>
PK K�!]�2Hq
q
simple.phpnu &1i� PK K�!]�ϻ�� � �
advanced.phpnu &1i� PK lA"]����
�
h color.phpnu &1i� PK lA"]�V�
f) index.htmlnu &1i� PK ) �)