GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Mail::SpamAssassin::HTML::Color(3) User Contributed Perl Documentation Mail::SpamAssassin::HTML::Color(3)

Mail::SpamAssassin::HTML::Color - A class to parse and manipulate CSS color values

  use Mail::SpamAssassin::HTML::Color;
  my $color = Mail::SpamAssassin::HTML::Color->new('rgba(255, 0, 153, 0.5)');
  $color->blend([255, 255, 255]);
  my $distance = $color->distance([0, 0, 0]);
  print "$color";  # Outputs the color as a hex string

This class provides methods to parse various CSS color formats, blend them with a background color, calculate the distance between two colors, and convert the color to a hex string.

Creates a new color object from a CSS color string.

Blends the color with the given background color. Modifies the color in-place and returns the modified object.

Calculates the distance between the current color and another color using a brightness-weighted geometric formula.

Returns the color as a hex string with a leading '#'.

Returns the color as an array of RGB values.

2025-04-29 perl v5.40.2

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.