Glyph Color Example

Are you looking for an easy way to change the color of a glyph in your FireMonkey application? Look no further than the Change Glyph Color Demo! This demo shows you how to use a FireMonkey TEffect to quickly and easily change the RGB color of a TGlyph with just one line of code.

This demo is perfect for Android, iOS, macOS, Windows, and Linux developers who want to create cross-platform applications with a single code base and single UI. So whether you’re targeting mobile devices or desktop computers, the Change Glyph Color Demo has you covered. Give it a try today and see how easy it is to add some flair to your FireMonkey applications!

Download the full cross-platform RGB color effect source code on Github.

This demo is part of over 100 cross-platform demos with everything from camera demos to emoji demos and painting demos.

What is a glyph in software development?

In glyph-based software development, a glyph is a symbol that represents a data element or an action. Glyphs are often used to provide visual cues to users, making it easier to navigate and interact with software applications. In many cases, glyphs are simply graphical representations of text characters. However, they can also be more complex symbols that convey specific meaning or convey information in a more abstract way. Glyphs are often used in icons and other user interface elements, and they can be an effective way to improve the usability of software applications.

Screenshot

What does the example source code look like?

unit Unit1;

interface

uses
  System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
  FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.ImgList,
  FMX.Layouts, FMX.StdCtrls, FMX.Effects, FMX.Controls.Presentation,
  FMX.Filter.Effects, System.ImageList, FMX.Objects;

type
  TForm1 = class(TForm)
    MaterialOxfordBlueSB: TStyleBook;
    ToolBar1: TToolBar;
    ShadowEffect4: TShadowEffect;
    Label1: TLabel;
    GridPanelLayout1: TGridPanelLayout;
    Glyph1: TGlyph;
    ImageList1: TImageList;
    FillRGBEffect1: TFillRGBEffect;
    Glyph2: TGlyph;
    FillRGBEffect2: TFillRGBEffect;
    Glyph3: TGlyph;
    FillRGBEffect3: TFillRGBEffect;
    Rectangle1: TRectangle;
    Rectangle2: TRectangle;
    Rectangle3: TRectangle;
    procedure Rectangle1Click(Sender: TObject);
    procedure Rectangle2Click(Sender: TObject);
    procedure Rectangle3Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.fmx}

procedure TForm1.Rectangle1Click(Sender: TObject);
begin
  FillRGBEffect1.Enabled := not FillRGBEffect1.Enabled;
end;

procedure TForm1.Rectangle2Click(Sender: TObject);
begin
  FillRGBEffect2.Enabled := not FillRGBEffect2.Enabled;
end;

procedure TForm1.Rectangle3Click(Sender: TObject);
begin
  FillRGBEffect3.Enabled := not FillRGBEffect3.Enabled;
end;

end.

Ready to learn how to program cross-platform apps like this?

Sign up for the Coding Boot Camp 2022 to learn to program. Topics include: Games, JavaScript, Web, Python, SQL, Databases, iOS, MacOS, Android, Mobile, Linux, Windows, Desktop, Server, and Arduino.


Reduce development time and get to market faster with RAD Studio, Delphi, or C++Builder.
Design. Code. Compile. Deploy.
Start Free Trial   Upgrade Today

   Free Delphi Community Edition   Free C++Builder Community Edition