Search for color

  1. Search 7.x for color
  2. Search 9.5.x for color
  3. Search 8.9.x for color
  4. Search 10.3.x for color
  5. Other projects

Exact matches

These are exact matches according to your search
Title Object type File name Summary
Color class core/lib/Drupal/Core/Render/Element/Color.php Provides a form element for choosing a color.
Color class core/lib/Drupal/Component/Utility/Color.php Performs color conversions.

All search results

Title Object type File name Summary
Color class core/lib/Drupal/Component/Utility/Color.php Performs color conversions.
Color class core/lib/Drupal/Core/Render/Element/Color.php Provides a form element for choosing a color.
color-picker.css file core/themes/olivero/css/components/color-picker.css Color picker styles. These appear within theme settings when selecting a custom color.
color-picker.pcss.css file core/themes/olivero/css/components/color-picker.pcss.css Color picker styles. These appear within theme settings when selecting a custom color.
Color.php file core/lib/Drupal/Component/Utility/Color.php
Color.php file core/lib/Drupal/Core/Render/Element/Color.php
Color::getInfo function core/lib/Drupal/Core/Render/Element/Color.php Returns the element properties for this element.
Color::hexToRgb function core/lib/Drupal/Component/Utility/Color.php Parses a hexadecimal color string like '#abc' or '#aabbcc'.
Color::normalizeHexLength function core/lib/Drupal/Component/Utility/Color.php Normalize the hex color length to 6 characters for comparison.
Color::preRenderColor function core/lib/Drupal/Core/Render/Element/Color.php Prepares a #type 'color' render element for input.html.twig.
Color::rgbToHex function core/lib/Drupal/Component/Utility/Color.php Converts RGB color arrays or strings to lowercase CSS notation.
Color::validateColor function core/lib/Drupal/Core/Render/Element/Color.php Form element validation handler for #type 'color'.
Color::validateHex function core/lib/Drupal/Component/Utility/Color.php Validates whether a hexadecimal color value is syntactically correct.
colors.css file core/themes/claro/css/theme/colors.css /*
* DO NOT EDIT THIS FILE.
* See the following change record for more information,
* https://www.drupal.org/node/3084859
* @preserve
*/
/**
* Reusable colors.
*/
.color-success {
color: #325e1c;
background-color: #f3faef;
}
.color-warning…
colors.pcss.css file core/themes/claro/css/theme/colors.pcss.css /**
* Reusable colors.
*/
.color-success {
color: #325e1c;
background-color: #f3faef;
}
.color-warning {
color: #734c00;
background-color: #fdf8ed;
}
.color-error {
color: #a51b00;
background-color: #fcf4f2;
}
ColorTest class core/tests/Drupal/Tests/Component/Utility/ColorTest.php Tests Color utility class conversions.
ColorTest.php file core/tests/Drupal/Tests/Component/Utility/ColorTest.php
ColorTest::providerTestHexToRgb function core/tests/Drupal/Tests/Component/Utility/ColorTest.php Data provider for testHexToRgb().
ColorTest::providerTestNormalizeHexLength function core/tests/Drupal/Tests/Component/Utility/ColorTest.php Data provider for testNormalizeHexLength().
ColorTest::providerTestRbgToHex function core/tests/Drupal/Tests/Component/Utility/ColorTest.php Data provider for testRgbToHex().
ColorTest::providerTestValidateHex function core/tests/Drupal/Tests/Component/Utility/ColorTest.php Provides data for testValidateHex().
ColorTest::testHexToRgb function core/tests/Drupal/Tests/Component/Utility/ColorTest.php Tests Color::hexToRgb().
ColorTest::testNormalizeHexLength function core/tests/Drupal/Tests/Component/Utility/ColorTest.php Tests Color::normalizeHexLength().
ColorTest::testRgbToHex function core/tests/Drupal/Tests/Component/Utility/ColorTest.php Tests Color::rgbToHex().
ColorTest::testValidateHex function core/tests/Drupal/Tests/Component/Utility/ColorTest.php @covers \Drupal\Component\Utility\Color::validateHex
FormTest::testColorValidation function core/modules/system/tests/src/Functional/Form/FormTest.php Tests validation of #type 'color' elements.
FormTestColorForm class core/modules/system/tests/modules/form_test/src/Form/FormTestColorForm.php Form constructor for testing #type 'color' elements.
FormTestColorForm.php file core/modules/system/tests/modules/form_test/src/Form/FormTestColorForm.php
FormTestColorForm::buildForm function core/modules/system/tests/modules/form_test/src/Form/FormTestColorForm.php Form constructor.
FormTestColorForm::getFormId function core/modules/system/tests/modules/form_test/src/Form/FormTestColorForm.php Returns a unique string identifying the form.
FormTestColorForm::submitForm function core/modules/system/tests/modules/form_test/src/Form/FormTestColorForm.php Form submission handler.
GDToolkit::getTransparentColor function core/modules/system/src/Plugin/ImageToolkit/GDToolkit.php Gets the color set for transparency in GIF images.
OliveroPostUpdateTest::testOliveroPrimaryColorUpdate function core/themes/olivero/tests/src/Functional/Update/OliveroPostUpdateTest.php Tests update hook setting base primary color.
ShapeOnlyColorEditableWidget class core/modules/system/tests/modules/entity_test/src/Plugin/Field/FieldWidget/ShapeOnlyColorEditableWidget.php Plugin implementation of the 'shape_only_color_editable_widget' widget.
ShapeOnlyColorEditableWidget.php file core/modules/system/tests/modules/entity_test/src/Plugin/Field/FieldWidget/ShapeOnlyColorEditableWidget.php
ShapeOnlyColorEditableWidget::formElement function core/modules/system/tests/modules/entity_test/src/Plugin/Field/FieldWidget/ShapeOnlyColorEditableWidget.php Returns the form for a single field widget.
TestEntityFormInjected::$color property core/tests/Drupal/Tests/Core/Entity/EntityTypeManagerTest.php The color of the entity type.
ThemeTest::testThemeSettingsColorHexCode function core/modules/system/tests/src/Functional/System/ThemeTest.php Tests the theme settings color input.
ToolkitGdTest::assertColorsAreEqual function core/tests/Drupal/KernelTests/Core/Image/ToolkitGdTest.php Assert two colors are equal by RGBA, net of full transparency.
ToolkitGdTest::getPixelColor function core/tests/Drupal/KernelTests/Core/Image/ToolkitGdTest.php Function for finding a pixel's RGBa values.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.