readonly === true ? 'readonly' : ''; $args = array( 'label' => $this->description, 'readonly' => $readonly, 'id' => $this->id, 'value' => $this->value, 'format' => $this->_get_format(), ); $loader = $this->_registry->get( 'theme.loader' ); $file = $loader->get_file( 'theme-options/color-picker.twig', $args, true ); return $file->get_content(); } /** * (non-PHPdoc) * Set up the color picker * @see Ai1ec_Less_Variable::set_up_renderable() */ protected function _get_format() { $format = 'hex'; if( substr( $this->value, 0, 3 ) === 'rgb' ) { if( substr( $this->value, 0, 4 ) === 'rgba' ) { $format = 'rgba'; } else { $format = 'rgb'; } } return $format; } }