An Oracle blog about NetBeans for PHP

Code Completion for Colors in CSS

Another improvements that is based on your comments is code completion for colors in CSS rules. The code completion for color and background property offers now at first position an item that opens color chooser. 

There is a standard Java color chooser and when you select a color in the chooser, the color is completed. The chooser remembered last selected color and also the item in code completion has an icon (small square) with the last selected color.

The color chooser above is from Linux platform. On Mac and Windows machine the color chooser looks like on the picture below and it looks better. If there will be time, the standard Java color chooser component will be replaced with a custom component, that should be better for web developer purpose.

If you look at the first picture, there are black and gray color code completion items. The black color items are used in the edited file and the gray color items are colors that are used in other CSS files in the project.

In the same way works code completion for color and background property of a style in HTML and PHP files.

Join the discussion

Comments ( 17 )
  • guest Thursday, February 25, 2010

    Simply awesome!

  • Sam Thursday, February 25, 2010

    Another great feature would be showing defined colors near line number on the left. IntelliJ IDEA does it this way.

  • Urkman Thursday, February 25, 2010

    Perhaps a little bit OT:

    But I can't uninstall plugins, using the latest dev build on OSX...

    Someone with the same problems?


  • Tor Norbye Thursday, February 25, 2010

    What about supporting the SVG color names? They're part of CSS3 and already accepted by most/all browsers.


  • Vaviloff Friday, February 26, 2010

    Brilliant, I've been missing color-picking function from the moment of migrating to NetBeans.

    And very nice proposition here is done by Sam, would be quite handy.

  • Marek Fukala Friday, February 26, 2010

    Tor, I've just added (web-main#6c8e503dc05d) the CSS3 SVG colors to the editor support. Thanks for the proposal.

  • pcdinh Friday, February 26, 2010

    It is definitely a big feature that is still missing in the previous releases. With that feature available in NB 6.9 I think I don't need Dreamweaver to choose a color for CSS selectors any more.


  • alexey_baranov Friday, February 26, 2010

    as usual cool

  • JNunez Sunday, February 28, 2010

    Anyway to swap out the ColorPicker with the NSColorWell on Mac OS X? The missing feature from the Java's and Apple is the eye drop tool that selects any color on the screen (e.g. designs).

  • thinsoldier Monday, March 1, 2010

    Will the mac/windows color pickers also have the Color Triangle?

  • php/ajax Tuesday, March 2, 2010

    This is very nice!

    Then only missing thing is the eye-drop tool. This would make it easier to pick colors from the screen.

    Here goes another idea...

    The only thing left for Netbeans to do is to provide a nice little photo editor to resize, recolor or crop images. Netbeans could also show a preview and/or dimensions of the image. I think these features will be a welcome addition for CSS3's border-image, etc.

    Another feature to have is the ability to load predefined color palettes or maybe even create a palette and share it with other users.

  • Christian Monday, March 8, 2010

    This is a nice feature. Thanks.

    But in my opinion the standard Linux chooser is okay...

    I think NetBeans becomes more and more an IDE which will be used by Web-Designers, too.

  • Denyerec Tuesday, March 9, 2010

    How are the colour values sorted in the dropdown? TopStyle sorts them by use-frequency, with the most used colours at the top of the list (With their use count displayed at the side)

    This is very useful for identifying which colour is used in which scenario when editing a document.

  • Azrael Valedhel Friday, March 12, 2010

    At last I don't have to use Opera widget/Firefox plugin to do this. :) Color picker is THE think that was most needed in CSS editor.

    Thank you. :]

  • azul Tuesday, April 20, 2010

    Hi, this is what i need in every CSS editor.

    Oh i remember something about ZendCoding. Does Netbeans support ZendCoding for both HTML & CSS

  • Armando Tuesday, June 8, 2010

    Aleluyaaaaaaaaaa! the selector color it available =D.

  • Amit Monday, September 19, 2011

    I cant locate color picker, i am using 7.0.1

Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.