Days
Hours
Minutes
Seconds
x

New Froala Editor v5.0.0 is here โ€“ Learn More

Skip to content
Froala Documentation

Popups

Custom Color Picker

Using the colors.min.js plugin you can add in the WYSIWYG HTML editor the color picker feature.

Try it yourself:

There are 3 options that can be used to customize the color picker:

  • colorsBackground - An array of colors used in the colors popup for background.
  • colorsStep - The number of colors displayed on a line in the colors popup.
  • colorsText - An array of colors used in the colors popup for text.

Edit in JSFiddle

HTML

<div id="froala-editor"></div>

JAVASCRIPT

<script>
  new FroalaEditor('div#froala-editor', {
    toolbarButtons: ['bold', 'italic', 'textColor', 'backgroundColor'],
    // Colors list.
    colorsBackground: [
      '#15E67F', '#E3DE8C', '#D8A076', '#D83762', '#76B6D8', 'REMOVE',
      '#1C7A90', '#249CB8', '#4ABED9', '#FBD75B', '#FBE571', '#FFFFFF'
    ],
    colorsStep: 6,
    colorsText: [
      '#15E67F', '#E3DE8C', '#D8A076', '#D83762', '#76B6D8', 'REMOVE',
      '#1C7A90', '#249CB8', '#4ABED9', '#FBD75B', '#FBE571', '#FFFFFF'
    ]
  })
</script>
Sign up

Download the code by signing up for our newsletter

Sign up

Download the code by signing up for our newsletter

Note: By registering, you confirm that you agree to the processing of your personal data by Froala, Inc. - Froala as described in the Privacy Statement. Froala, Inc. - Froala is part of the Idera group and may share your information with its parent company Idera, Inc., and its affiliates. For further details on how your data is used, stored, and shared, please review our Privacy Statement.