Returns red colored if not ok

@param string $value
@param mixed $ok Boolish value
@return string Value in HTML tags
768870
public function warning($value, $ok = false) {
		if (!$ok) {
			return $this->ok($value, false);
		}
		return $value;
	}
1045968
public static function sanitize( $value ) {
		if ( class_exists( '\Kirki\Field\Color' ) ) {
			return \Kirki\Field\Color::sanitize( $value );
		}
		return esc_attr( $value );
	}
950578
public function color($name, $value = null, $options = array())
    {
		return $this->input('color', $name, $value, $options);
    }
720896
public function html($value, array $options, $mode) {
        if ($mode === self::TO && $options['encode']) {
            return htmlentities($value, $options['flags'], $options['encoding']);
        }

        if ($mode === self::FROM && $options['decode']) {
            return html_entity_decode($value, $options['flags'], $options['encoding']);
        }

        return $value;
    }
431178
public static function toBooleanValue(string $value): bool
    {
        if (empty($value)) {
            return false;
        }
        
        return !in_array(strtolower(trim($value)), StringUtils::FALSES);
    }
236427
public static function getDisplayValue($value)
  {
    switch($value)
    {
      case self::ACTIVE:
        return 'Active';
      case self::ARCHIVED:
        return 'Archived';
      case self::PENDING:
        return 'Pending';
      case self::CORRUPT:
        return 'Corrupt';
      default:
        return $value;
    }
  }
1144181
public static function get($value)
    {

        if ($value instanceof ColorInterface)
            return $value;

        if (empty($value))
            return new RgbColor(0,0,0);

        if (is_int($value))
            return self::parseInt($value);

        if ($color = self::parseName($value))
            return $color;

        if ($color = self::parseHexString($value))
            return $color;

        if ($color = self::parseFunctionString($value))
            return $color;

        return null;
    }
1273670
public function compile($value = "")
	{
		$html = $this->compiledLabel;

		if (!empty($this->help)) {
			$html .= "<div class='help'>{$this->help}</div>";
		}

		$hasOptionValue = $this->hasOptionValue($this->options);

		$html .= "<select name=\"{$this->name}\" {$this->compiledAttr}>";

		// handle options in an associative array differently than ones in a numeric array
		if ($hasOptionValue || $this->useNumericValue) {

			foreach ($this->options as $k => $v) {
				$html .= "<option value=\"{$k}\"";
				if ($value === $k || (is_numeric($value) && (int) $value === $k)) {
					$html .= " selected=\"selected\"";
				}
				$html .= ">{$v}</option>";
			}

		} else {

			foreach ($this->options as $k => $v) {
				$html .= "<option value=\"{$v}\"";
				if ( $value === $v) {
					$html .= " selected=\"selected\"";
				}
				$html .= ">{$v}</option>";
			}
		}

		$html .= "</select>";

		return $html;
	}
458775
public function parseBoolean($value) {
    if (is_bool($value)) return $value;

    $exportValue = var_export($value, true);
    $e = new ParseException("$exportValue could not be parsed as a boolean");

    if (!is_string($value)) throw $e;

    switch (strtolower($value)) {
      case 'true':
      case 'on':
      case 'yes':
      case 'y':
        return true;
      case 'false':
      case 'off':
      case 'no':
      case 'n':
        return false;
      default:
        throw $e;
    }
  }
722973
protected function htmlOptionsResult($value = '')
    {
        $class = !empty($this->defaults['resultClass']) ? $this->defaults['resultClass'] . $value : '';
        $style = !empty($this->defaults['resultStyle']) ? $this->defaults['resultStyle'] : '';

        if (!empty($this->bootstrapDefaults['resultClass'])) {
            $class .= $this->bootstrapDefaults['resultClass'];
        }
        if (!empty($this->bootstrapDefaults['resultStyle'])) {
            $style .= $this->bootstrapDefaults['resultStyle'];
        }
        if (!empty($this->resultClass) && is_string($this->resultClass)) {
            $class .= ' ' . $this->resultClass;
        }
        if (!empty($this->resultStyle) && is_string($this->resultStyle)) {
            $style .= ' ' . $this->resultStyle;
        }

        return [
            'class' => $class ?: null,
            'style' => $style ?: null,
        ];
    }
1307565
protected function formatColor($value)
		# Author:     Jarrod Oberto
		# Date:       09-05-11
		# Purpose:    Determine color method passed in and return color as RGB
		# Param in:   (mixed) $value: (array) Could be an array of RGB
		#               (str) Could be hex #ffffff or #fff, fff, ffffff
		# Param out:
		# Reference:
		# Notes:
		#
	{
		$rgbArray = array();

		// *** If it's an array it should be R, G, B
		if (is_array($value))
		{

			if (key($value) == 0 && count($value) == 3)
			{

				$rgbArray['r'] = $value[0];
				$rgbArray['g'] = $value[1];
				$rgbArray['b'] = $value[2];

			}
			else
			{
				$rgbArray = $value;
			}
		}
		else
		{
			if (fix_strtolower($value) == 'transparent')
			{

				$rgbArray = array(
					'r' => 255,
					'g' => 255,
					'b' => 255,
					'a' => 127
				);

			}
			else
			{

				// *** ...Else it should be hex. Let's make it RGB
				$rgbArray = $this->hex2dec($value);
			}
		}

		return $rgbArray;
	}
1175335
public static function string(&$value, $options = ['length'=>null, 'regex'=>null, 'default'=>null])
    {
        $value = htmlspecialchars(trim($value));
        self::processString($value, $options);
        return $value;
    }
267449
protected function normalizeBoolean($value)
    {
        switch (true) {
            case $this->checkFlag(self::BOOLEAN_MODE_INTEGER):
            default:
                return (int) $value;

                break;

            case $this->checkFlag(self::BOOLEAN_MODE_BOOL_STRING):
                return $value === true ? 'true' : 'false';

                break;

            case $this->checkFlag(self::BOOLEAN_MODE_STRING):
                return $value === true ? 'On' : 'Off';

                break;
        }
    }
1035037
protected function getStringValue($value)
    {
        if ($value === true) {
            return 'true';
        } elseif ($value === false) {
            return 'false';
        } elseif ($value === null) {
            return 'null';
        } elseif (is_string($value)) {
            return "\"$value\"";
        }

        return rtrim(print_r($value, true));
    }
913981
public static function getValue($value)
    {
        if (is_string($value)) {
            return static::escapeText($value);
        }
        if (is_bool($value)) {
            return static::getBoolean($value);
        }
        if (is_array($value)) {
            return static::getArray($value);
        }
        return $value;
    }
851822
private static function toPlainValue($value)
    {
        if (is_string($value)) {
            $value = strip_tags($value);
            $value = html_entity_decode($value, ENT_QUOTES | ENT_XML1, 'UTF-8');
            $value = trim($value);

            return ($value === '') ? null : $value;
        }

        return $value;
    }
1275054
public static function enum(&$value, $options = ['enum'=>[], 'strict'=>false, 'default'=>null])
    {
        if (isset($options['enum']) && is_array($options['enum']) && $options['enum'] != []) {
            $value = in_array($value, $options['enum'], isset($options['strict']) && $options['strict']) ?
                $value : (isset($options['default']) ?
                    $options['default'] : current($options['enum']));
        } else {
            $value = isset($options['default']) ? $options['default'] : null;
        }
        return $value;
    }