ColorConfigCacheInvalidator::__construct

public ColorConfigCacheInvalidator::__construct(CacheTagsInvalidatorInterface $cache_tags_invalidator) Constructs a ColorConfigCacheInvalidator object. Parameters \Drupal\Core\Cache\CacheTagsInvalidatorInterface $cache_tags_invalidator: The cache tags invalidator. File core/modules/color/src/EventSubscriber/ColorConfigCacheInvalidator.php, line 28 Class ColorConfigCacheInvalidator A subscriber invalidating cache tags when color config objects are saved. Namespace Drupal\color\EventSubs

Color::preRenderColor

public static Color::preRenderColor($element) Prepares a #type 'color' render element for input.html.twig. Parameters array $element: An associative array containing the properties of the element. Properties used: #title, #value, #description, #attributes. Return value array The $element with prepared variables ready for input.html.twig. File core/lib/Drupal/Core/Render/Element/Color.php, line 81 Class Color Provides a form element for choosing a color. Namespace Drupal\Core\Render\El

Color::validateColor

public static Color::validateColor(&$element, FormStateInterface $form_state, &$complete_form) Form element validation handler for #type 'color'. File core/lib/Drupal/Core/Render/Element/Color.php, line 52 Class Color Provides a form element for choosing a color. Namespace Drupal\Core\Render\Element Code public static function validateColor(&$element, FormStateInterface $form_state, &$complete_form) { $value = trim($element['#value']); // Default to black if no val

ColorConfigCacheInvalidator

A subscriber invalidating cache tags when color config objects are saved. Hierarchy class \Drupal\color\EventSubscriber\ColorConfigCacheInvalidator implements EventSubscriberInterface File core/modules/color/src/EventSubscriber/ColorConfigCacheInvalidator.php, line 13 Namespace Drupal\color\EventSubscriber Members Name Modifiers Type Description ColorConfigCacheInvalidator::$cacheTagsInvalidator protected property The cache tags invalidator. ColorConfigCacheInvalidator

Color::hexToRgb

public static Color::hexToRgb($hex) Parses a hexadecimal color string like '#abc' or '#aabbcc'. Parameters string $hex: The hexadecimal color string to parse. Return value array An array containing the values for 'red', 'green', 'blue'. Throws \InvalidArgumentException File core/lib/Drupal/Component/Utility/Color.php, line 44 Class Color Performs color conversions. Namespace Drupal\Component\Utility Code public static function hexToRgb($hex) { if (!self::validateHex($hex)) { t

Color::validateHex

public static Color::validateHex($hex) Validates whether a hexadecimal color value is syntactically correct. Parameters $hex: The hexadecimal string to validate. May contain a leading '#'. May use the shorthand notation (e.g., '123' for '112233'). Return value bool TRUE if $hex is valid or FALSE if it is not. File core/lib/Drupal/Component/Utility/Color.php, line 20 Class Color Performs color conversions. Namespace Drupal\Component\Utility Code public static function validateHex($hex

Color::rgbToHex

public static Color::rgbToHex($input) Converts RGB color arrays and RGB strings in CSS notation to lowercase simple colors like '#aabbcc'. Parameters array|string $input: The value to convert. If the value is an array the first three elements will be used as the red, green and blue components. String values in CSS notation like '10, 20, 30' are also supported. Return value string The lowercase simple color representation of the given color. File core/lib/Drupal/Component/Utility/Color.php, li

Color::getInfo

public Color::getInfo() Returns the element properties for this element. Return value array An array of element properties. See \Drupal\Core\Render\ElementInfoManagerInterface::getInfo() for documentation of the standard properties of all elements, and the return value format. Overrides ElementInterface::getInfo File core/lib/Drupal/Core/Render/Element/Color.php, line 31 Class Color Provides a form element for choosing a color. Namespace Drupal\Core\Render\Element Code public function

color.install

Install, update and uninstall functions for the color module. File core/modules/color/color.install Functions Name Description color_requirements Implements hook_requirements().

color.module

Allows users to change the color scheme of themes. File core/modules/color/color.module Functions Name Description color_block_view_pre_render #pre_render callback: Sets color preset logo. color_block_view_system_branding_block_alter Implements hook_block_view_BASE_BLOCK_ID_alter(). color_form_system_theme_settings_alter Implements hook_form_FORM_ID_alter(). color_get_info Retrieves the Color module information for a particular theme. color_get_palette Retrieves the co