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 4836 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
Version 8.18.x (untested)

You must login before you can report on package compatibility.

Previously reported to work on versions:

Package Information

  • Package owner: Warren Buckley
  • Created: 24/01/2012
  • Current version 1.0
  • License MIT
  • Downloads on Our: 1K