question

newuser-ece92cf0-b91d-4353-8319-16105d46c99a avatar image

Change textcolor of Alexa Header/Footer

Hi,

I'm using the AlexaHeader and AlexaFooter elements of APL and changed the default text color for my skill. Since by default the textstyle does not apply to these header / footer elements, I was wondering how to change the font color there.

Thank you in advance!

Kind regards,

Peter

alexa skills kitalexaapldesign
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Alexander Martin avatar image
Alexander Martin answered

Hi,

you can either use the "theme" attribute to change the text color. Possible values are "light" and "dark", or you can overwrite the resources "colorTextReversed", "colorTextSecondary" and "colorTextSecondaryReversed" like I did in my example with your own color code. The Reversed properties are used for the theme "dark".


{
    "type": "APL",
    "version": "1.4",
    "settings": {},
    "theme": "dark",
    "import": [{
        "name" :"alexa-layouts",
        "version": "1.2.0"
    }],
    "resources": [{
        "colors": {
            "colorTextReversed": "#ff0000",
            "colorTextSecondary": "#ffd700",
            "colorTextSecondaryReversed": "#ff0000"
        }
    }],
    "styles": {},
    "onMount": [],
    "graphics": {},
    "commands": {},
    "layouts": {},
    "mainTemplate": {
        "parameters": [
            "payload"
        ],
        "items": [{
            "type": "AlexaHeader",
            "headerTitle": "Primary Text",
            "headerSubtitle": "Subtitle",
            "theme": "dark"
        }]
    }
}

Regards,

Alex

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

newuser-ece92cf0-b91d-4353-8319-16105d46c99a avatar image
newuser-ece92cf0-b91d-4353-8319-16105d46c99a answered

Thank you very much @Alexander Martin! Worked as expected.

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.