4 votes

RGBA Property Editor

This package is exclusively for V5 of Umbraco, so please do not try to install it in a version 4 Umbraco site.

Description

This package installs a RGBA Colour Picker Property Editor plugin into your Umbraco V5 website. That will allow you to save a RGB, RGBA and Hex colour based.

Documentation

The property has six values that you can retrieve from it to use in your Razor code:

  • Red
  • Green
  • Blue
  • Alpha
  • Hex
  • RGB
  • RGBA

For example if your current page has the RGBA property with the alias of 'sidebarColour' you could for example retrieve the value of RGBA which is a CSV string that you could pass into some CSS on the page.

<style type="text/css">
    /* Overrides */
    aside 
    {
	/* Safe fallbacks to RGB then fallback to solid Hex */
        background-color: @DynamicModel.sidebarColour.Hex;
        background-color: rgb(@DynamicModel.sidebarColour.RGB);
        background-color: rgba(@DynamicModel.sidebarColour.RGBA);
    }
</style>

PreValues

Prevalues are the settings for the property editor when you create the Data Type in the Developer section of Umbraco. To configure the Bing Map you need the following settings setup:

  • Red
  • Green
  • Blue
  • Alpha

Source Code

This property editor was fairly straight forward to create, so I highly recommend you look at the source code found in the Umbraco V5 Contrib Project on Codeplex and pull apart the source, learn and make your own great property editors that you can share with the community.
http://umbraco5contrib.codeplex.com

 

Screenshots

Package owner

Warren Buckley

Warren Buckley

Warren has 4521 karma points

Package Compatibility

This package is compatible with the following versions as reported by community members who have downloaded this package:
Untested or doesn't work on Umbraco Cloud
8.3.x (untested)
8.2.x (untested)
8.1.x (untested)
8.0.x (untested)
7.15.x (untested)
7.14.x (untested)
7.13.x (untested)
7.12.x (untested)
7.11.x (untested)
7.10.x (untested)
7.9.x (untested)
7.8.x (untested)
7.7.x (untested)
7.6.x (untested)
7.5.x (untested)
7.4.x (untested)
7.3.x (untested)
7.2.x (untested)
7.1.x (untested)
7.0.x (untested)
6.1.x (0%)
6.0.x (untested)

You must login before you can report on package compatibility.

Package Information

  • Package owner: Warren Buckley
  • Created: 24/01/2012
  • Current version 1.0
  • License MIT
  • Downloads: 1986