-
Notifications
You must be signed in to change notification settings - Fork 21
Home
Mahdi Safsafi edited this page May 26, 2017
·
3 revisions
Create a new ImmersiveColors object
var
m: TImmersiveColors;
begin
m := TImmersiveColors.Create;
end;
use TImmersiveColors.IsImmersiveColorsSupported
property to check if immersive colors are supported.
if m.IsImmersiveColorsSupported then
// Supported.
var
ActiveSet: TColorSet;
begin
ActiveSet := m.ActiveColorSet;
end;
You can get Immersive color value using TColorSet.Colors
property.
Color := ActiveSet.Colors[ImmersiveSaturatedBackground];
For a complete list of available immersive colors, refer to TImmersiveColorType
type.
procedure TMain.ColorSetChanged(Sender: TObject);
begin
// This method will get called each time the user changes immersive colors settings.
end;
begin
m.OnColorSetChanged := ColorSetChanged;
end;