Skip to content

v1.1.0

Choose a tag to compare

@AhashSritharan AhashSritharan released this 19 Apr 13:44
· 1 commit to main since this release
228ae98

Overview

This release enhances the SmartButton PCF Control with customizable button styling, allowing you to define background colors for your buttons. The control intelligently handles color transformations and ensures proper text contrast. Both managed and unmanaged solutions are available.

image

New Features

  • Custom Background Colors:

    • Set background colors using hex codes (with or without # prefix)
  • Intelligent Color Handling:

    • Automatic calculation of hover and pressed state colors
    • Proper text contrast through automatic white/black text selection
    • Consistent color transformations matching Fluent UI standards

Examples of What's Now Possible

Background Color: #1267b4

Technical Details

  • Color transformation uses HSL color space for natural transitions
  • Hover colors are calculated with 8% less saturation and 14% less lightness
  • Pressed colors are calculated with 25% less saturation and 44% less lightness
  • Text color switches to white when background luminance < 0.5 (WCAG standard)

Installation

  • Import either the managed (recommended for production) or unmanaged solution into your Dynamics 365/Power Platform environment
  • Use the Smart Button PCF control on your forms
  • Configure buttons through the "Button Configuration" table, including the new Background Color field

Requirements

  • Power Platform environment
  • Model-driven app forms

Full Changelog

https://github.com/AhashSritharan/PCF-SmartButton/commits/v1.1.0