Adds predefined color styles to the Color styles
default primary success info warning danger
349843
protected function loadDefaultStyles(): void
    {
        $this
            ->addByArray(self::NORMAL, ['fg' => 'normal'])
            // 不明显的 浅灰色的
            ->addByArray(self::FAINTLY, ['fg' => 'normal', 'options' => ['italic']])
            ->addByArray(self::BOLD, ['options' => ['bold']])
            ->addByArray(self::INFO, ['fg' => 'green',])//'options' => ['bold']
            ->addByArray(self::NOTE, ['fg' => 'cyan', 'options' => ['bold']])//'options' => ['bold']
            ->addByArray(self::PRIMARY, ['fg' => 'yellow', 'options' => ['bold']])//
            ->addByArray(self::SUCCESS, ['fg' => 'green', 'options' => ['bold']])
            ->addByArray(self::NOTICE, ['options' => ['bold', 'underscore'],])
            ->addByArray(self::WARNING, ['fg' => 'black', 'bg' => 'yellow',])//'options' => ['bold']
            ->addByArray(self::COMMENT, ['fg' => 'yellow',])//'options' => ['bold']
            ->addByArray(self::QUESTION, ['fg' => 'black', 'bg' => 'cyan'])
            ->addByArray(self::DANGER, ['fg' => 'red',])// 'bg' => 'magenta', 'options' => ['bold']
            ->add(self::ERROR, 'white', 'red', [], true)
            ->add('underline', 'normal', '', ['underscore'])
            ->add('blue', 'blue')
            ->add('cyan', 'cyan')
            ->add('magenta', 'magenta')
            ->add('mga', 'magenta')
            ->add('red', 'red')
            ->addByArray('yellow', ['fg' => 'yellow'])
            ->addByArray('darkGray', ['fg' => 'black', 'extra' => true]);
    }
536030
def setStyle(self, style):
        
        self._style = style
        self.setDirty()
        self.update()
604017
def add_styles(self, **styles):
        """"""
        for stylename in sorted(styles):
            self._doc.styles.addElement(styles[stylename])
944119
private static function setDefaults() {
            if (!self::$defaults) {
                self::$defaults =
                    [self::CFG_CSS_PATH           => __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' .
                                                     DIRECTORY_SEPARATOR . 'error.min.css',
                     self::CFG_TRACE_MAX_DEPTH    => 50,
                     self::CFG_BACKGROUND         => 'default',
                     self::CFG_FOREGROUND_NOTICE  => 'cyan',
                     self::CFG_FOREGROUND_WARNING => 'yellow',
                     self::CFG_FOREGROUND_ERROR   => 'red',
                     self::CFG_FORCE_HTML         => false];
            }
        }
156890
private void manageDefaultStyleSheet(final Scene scene) {
        if (scene.getStylesheets().isEmpty()) {
            // No style sheet has been added to the scene
            LOGGER.log(NO_CSS_DEFINED);
            addCSS(scene, JRebirthStyles.DEFAULT);
        }

    }
894353
def _init_style(self):
        
        self._background = QtGui.QColor('white')
        self._foreground = QtGui.QColor('black')
        self._whitespaces_foreground = QtGui.QColor('light gray')
        app = QtWidgets.QApplication.instance()
        self._sel_background = app.palette().highlight().color()
        self._sel_foreground = app.palette().highlightedText().color()
        self._font_size = 10
        self.font_name = ""
645226
def default_styles():
    """"""

    styles = {}

    def _add_style(name, **kwargs):
        styles[name] = _create_style(name, **kwargs)

    _add_style('heading-1',
               family='paragraph',
               fontsize='24pt',
               fontweight='bold',
               )
    _add_style('heading-2',
               family='paragraph',
               fontsize='22pt',
               fontweight='bold',
               )
    _add_style('heading-3',
               family='paragraph',
               fontsize='20pt',
               fontweight='bold',
               )
    _add_style('heading-4',
               family='paragraph',
               fontsize='18pt',
               fontweight='bold',
               )
    _add_style('heading-5',
               family='paragraph',
               fontsize='16pt',
               fontweight='bold',
               )
    _add_style('heading-6',
               family='paragraph',
               fontsize='14pt',
               fontweight='bold',
               )
    _add_style('normal-paragraph',
               family='paragraph',
               fontsize='12pt',
               marginbottom='0.25cm',
               )
    _add_style('code',
               family='paragraph',
               fontsize='10pt',
               fontweight='bold',
               fontfamily='Courier New',
               color='#555555',
               )
    _add_style('quote',
               family='paragraph',
               fontsize='12pt',
               fontstyle='italic',
               )
    _add_style('list-paragraph',
               family='paragraph',
               fontsize='12pt',
               marginbottom='.1cm',
               )
    _add_style('sublist-paragraph',
               family='paragraph',
               fontsize='12pt',
               marginbottom='.1cm',
               )
    _add_style('numbered-list-paragraph',
               family='paragraph',
               fontsize='12pt',
               marginbottom='.1cm',
               )

    _add_style('normal-text',
               family='text',
               fontsize='12pt',
               )
    _add_style('italic',
               family='text',
               fontstyle='italic',
               fontsize='12pt',
               )
    _add_style('bold',
               family='text',
               fontweight='bold',
               fontsize='12pt',
               )
    _add_style('url',
               family='text',
               fontsize='12pt',
               fontweight='bold',
               fontfamily='Courier',
               )
    _add_style('inline-code',
               family='text',
               fontsize='10pt',
               fontweight='bold',
               fontfamily='Courier New',
               color='#555555',
               )

    styles['_numbered_list'] = _numbered_style()

    return styles
1221544
function updatePseudoClassStyle(styleId, properties, preventFocusStyleForTouchAndClick) {
  const baseStyle = properties.primary ? buttonStyle.primaryStyle : buttonStyle.style;
  const baseDisabledStyle = properties.primary ? buttonStyle.primaryDisabledStyle : buttonStyle.disabledStyle;
  const disabledStyle = {
    ...baseStyle,
    ...properties.style,
    ...baseDisabledStyle,
    ...properties.disabledStyle,
  };
  const baseActiveStyle = properties.primary ? buttonStyle.primaryActiveStyle : buttonStyle.activeStyle;
  const activeStyle = {
    ...baseActiveStyle,
    ...properties.activeStyle,
  };

  let focusStyle;
  if (preventFocusStyleForTouchAndClick) {
    focusStyle = { outline: 0 };
  } else {
    const baseFocusStyle = properties.primary ? buttonStyle.primaryFocusStyle : buttonStyle.focusStyle;
    focusStyle = {
      ...baseFocusStyle,
      ...properties.focusStyle,
    };
  }

  const styles = [
    {
      id: styleId,
      style: activeStyle,
      pseudoClass: 'active',
    },
    {
      id: styleId,
      style: disabledStyle,
      pseudoClass: 'active',
      disabled: true,
    },
    {
      id: styleId,
      style: focusStyle,
      pseudoClass: 'focus',
    },
  ];

  injectStyles(styles);
}
1152187
public void setCustomColors(final boolean CUSTOM_COLORS) {
        customColors = CUSTOM_COLORS;
        if (customColors) {
            init(getInnerBounds().width, getInnerBounds().height);
            repaint(getInnerBounds());
        }
    }
555748
function stylesheetOverride(stylesheet, props, themeData) {
  return {
    ...stylesheet,
    pointerBorder: { fill: themeData["tooltip.backgroundColor"] },
    pointerBody: { fill: themeData["tooltip.backgroundColor"] }
  };
}
1113786
def set_style(primary=None, secondary=None):
    
    global _primary_style, _secondary_style
    if primary:
        _primary_style = primary
    if secondary:
        _secondary_style = secondary
1111703
function styleColor(sq, color) {
  if (!sq.hasFormat('PRE')) {
    if (color === RESET_COLOR) {
      sq.changeFormat(null, {
        class: 'colour',
        tag: 'span'
      });
    } else {
      sq.setTextColour(color);
    }
  }
}
762878
public void setButtonStyle(I_CmsButton.ButtonStyle style, I_CmsButton.ButtonColor color) {

        if (m_buttonStyle != null) {
            for (String styleName : m_buttonStyle.getAdditionalClasses()) {
                removeStyleName(styleName);
            }
        }
        if (style == ButtonStyle.TRANSPARENT) {
            setSize(null);
        }
        addStyleName(style.getCssClassName());
        m_buttonStyle = style;

        if (m_color != null) {
            removeStyleName(m_color.getClassName());
        }
        if (color != null) {
            addStyleName(color.getClassName());
        }
        m_color = color;
    }
618721
public void initInfoStyle() {

        m_icon.addStyleName(I_CmsButton.ICON_FONT);
        m_icon.addStyleName(I_CmsButton.ICON_CIRCLE_HELP);
        m_icon.addStyleName(I_CmsLayoutBundle.INSTANCE.buttonCss().cmsFontIconButton());
        m_icon.addStyleName(I_CmsLayoutBundle.INSTANCE.buttonCss().hoverBlack());
        m_icon.addStyleName(I_CmsLayoutBundle.INSTANCE.buttonCss().helpIcon());
    }
46710
function updatePseudoClassStyle(pseudoStyleIds, properties, preventFocusStyleForTouchAndClick) {
  const styles = [
    {
      id: pseudoStyleIds.prevMonthNavStyleId,
      style: {
        ...defaultStyle.hoverPrevMonthNavStyle,
        ...properties.hoverPrevMonthNavStyle,
      },
      pseudoClass: 'hover',

    }, {
      id: pseudoStyleIds.nextMonthNavStyleId,
      style: {
        ...defaultStyle.hoverNextMonthNavStyle,
        ...properties.hoverNextMonthNavStyle,
      },
      pseudoClass: 'hover',
    },
  ];
  let focusStyle;
  if (preventFocusStyleForTouchAndClick) {
    focusStyle = { outline: 0 };
  } else {
    focusStyle = {
      ...defaultStyle.focusStyle,
      ...properties.focusStyle,
    };
  }

  styles.push({
    id: pseudoStyleIds.styleId,
    style: focusStyle,
    pseudoClass: 'focus',
  });
  injectStyles(styles);
}
338327
private static function initStyles() {
            if (empty(self::$styles)) {
                foreach (self::$styleColours as $colourCode => $class) {
                    self::$styles[$colourCode] = new $class();

                    foreach (self::$styleVariants as $varCode => $var) {
                        self::$styles[$colourCode . $varCode] = new $class($var);
                    }
                }
            }
        }
648753
public void addToContentStyles(final StylesContainer stylesContainer) {
        stylesContainer.addContentStyle(this);
        if (this.defaultCellStyle != null) {
            stylesContainer.addContentStyle(this.defaultCellStyle);
        }
    }