@@ -10,6 +10,7 @@ import {Format, png} from "../../../src/values/format";
1010import { Underlay } from "../../../src/actions/underlay" ;
1111import { Timeline } from "../../../src/values/timeline" ;
1212import { base64Encode } from "../../../src/internal/utils/base64Encode" ;
13+ import { TextStyle } from "../../../src/values/textStyle" ;
1314
1415describe ( 'Tests for overlay actions' , ( ) => {
1516 it ( 'Tests Image on Image with publicID encoding' , ( ) => {
@@ -82,6 +83,18 @@ describe('Tests for overlay actions', () => {
8283 expect ( asset . toString ( ) ) . toBe ( `b_red,co_blue,l_text:${ textStyle . toString ( ) } :Testing/fl_layer_apply` ) ;
8384 } ) ;
8485
86+ it ( 'Tests text on image with RGB backgroundColor' , ( ) => {
87+ const asset = createNewImage ( ) ;
88+
89+ asset . overlay ( Overlay . source (
90+ Source . text ( 'Testing' , new TextStyle ( 'arial' , 15 ) )
91+ . backgroundColor ( '#FEB61FC2' )
92+ . textColor ( 'blue' )
93+ ) ) ;
94+
95+ expect ( asset . toString ( ) ) . toBe ( `b_rgb:FEB61FC2,co_blue,l_text:arial_15:Testing/fl_layer_apply` ) ;
96+ } ) ;
97+
8598 it ( 'Tests nested subtitles on image' , ( ) => {
8699 const asset = createNewImage ( ) ;
87100 const textStyle = sampleTextStyle ( ) ;
0 commit comments