_color_shift

_color_shift($given, $ref1, $ref2, $target) Shifts a given color, using a reference pair and a target blend color. Note: this function is significantly different from the JS version, as it is written to match the blended images perfectly. Constraint: if (ref2 == target + (ref1 - target) * delta) for some fraction delta then (return == target + (given - target) * delta). Loose constraint: Preserve relative positions in saturation and luminance space. File core/modules/color/color.module, line 68

_color_save_stylesheet

_color_save_stylesheet($file, $style, &$paths) Saves the rewritten stylesheet to disk. File core/modules/color/color.module, line 582 Allows users to change the color scheme of themes. Code function _color_save_stylesheet($file, $style, &$paths) { $filepath = file_unmanaged_save_data($style, $file, FILE_EXISTS_REPLACE); $paths['files'][] = $filepath; // Set standard file permissions for webserver-generated files. drupal_chmod($file); }

_color_unpack

_color_unpack($hex, $normalize = FALSE) Converts a hex color into an RGB triplet. File core/modules/color/color.module, line 753 Allows users to change the color scheme of themes. Code function _color_unpack($hex, $normalize = FALSE) { if (strlen($hex) == 4) { $hex = $hex[1] . $hex[1] . $hex[2] . $hex[2] . $hex[3] . $hex[3]; } $c = hexdec($hex); for ($i = 16; $i >= 0; $i -= 8) { $out[] = (($c >> $i) & 0xFF) / ($normalize ? 255 : 1); } return $out; }

_comment_entity_uses_integer_id

_comment_entity_uses_integer_id($entity_type_id) Determines if an entity type is using an integer-based ID definition. Parameters string $entity_type_id: The ID the represents the entity type. Return value bool Returns TRUE if the entity type has an integer-based ID definition and FALSE otherwise. File core/modules/comment/comment.module, line 411 Enables users to comment on published content. Code function _comment_entity_uses_integer_id($entity_type_id) { $entity_type = \Drupal::entityM

_color_rgb2hsl

_color_rgb2hsl($rgb) Converts an RGB triplet to HSL. File core/modules/color/color.module, line 809 Allows users to change the color scheme of themes. Code function _color_rgb2hsl($rgb) { $r = $rgb[0]; $g = $rgb[1]; $b = $rgb[2]; $min = min($r, min($g, $b)); $max = max($r, max($g, $b)); $delta = $max - $min; $l = ($min + $max) / 2; $s = 0; if ($l > 0 && $l < 1) { $s = $delta / ($l < 0.5 ? (2 * $l) : (2 - 2 * $l)); } $h = 0; if ($delta > 0) {

_color_rewrite_stylesheet

_color_rewrite_stylesheet($theme, &$info, &$paths, $palette, $style) Rewrites the stylesheet to match the colors in the palette. File core/modules/color/color.module, line 512 Allows users to change the color scheme of themes. Code function _color_rewrite_stylesheet($theme, &$info, &$paths, $palette, $style) { // Prepare color conversion table. $conversion = $palette; foreach ($conversion as $k => $v) { $conversion[$k] = Unicode::strtolower($v); } $default = c

_color_gd

_color_gd($img, $hex) Converts a hex triplet into a GD color. File core/modules/color/color.module, line 731 Allows users to change the color scheme of themes. Code function _color_gd($img, $hex) { $c = array_merge(array($img), _color_unpack($hex)); return call_user_func_array('imagecolorallocate', $c); }

_color_hue2rgb

_color_hue2rgb($m1, $m2, $h) Helper function for _color_hsl2rgb(). File core/modules/color/color.module, line 797 Allows users to change the color scheme of themes. Code function _color_hue2rgb($m1, $m2, $h) { $h = ($h < 0) ? $h + 1 : (($h > 1) ? $h - 1 : $h); if ($h * 6 < 1) { return $m1 + ($m2 - $m1) * $h * 6; } if ($h * 2 < 1) { return $m2; } if ($h * 3 < 2) { return $m1 + ($m2 - $m1) * (0.66666 - $h) * 6; } return $m1; }

_color_blend

_color_blend($img, $hex1, $hex2, $alpha) Blends two hex colors and returns the GD color. File core/modules/color/color.module, line 739 Allows users to change the color scheme of themes. Code function _color_blend($img, $hex1, $hex2, $alpha) { $in1 = _color_unpack($hex1); $in2 = _color_unpack($hex2); $out = array($img); for ($i = 0; $i < 3; ++$i) { $out[] = $in1[$i] + ($in2[$i] - $in1[$i]) * $alpha; } return call_user_func_array('imagecolorallocate', $out); }

_batch_shutdown

_batch_shutdown() Shutdown function: Stores the current batch data for the next request. See also _batch_page() drupal_register_shutdown_function() File core/includes/batch.inc, line 515 Batch processing API for processes to run in multiple HTTP requests. Code function _batch_shutdown() { if ($batch = batch_get()) { \Drupal::service('batch.storage')->update($batch); } }