Forum Discussion
Changing the colour of the closed captions font and the background?
Hello!
I am playing around with the closed caption feature and try to make it work with our corporate colours.
Is there a way to alter the colors of the background and the fonts of the closed captions?
Hello Everyone!
I'm happy to share that we have released Storyline 360 version 86 (Build 3.86.32028.0).
Included in this release we have two new features:
- Position captions at the top or bottom of the slide to ensure closed caption visibility and prevent the obstruction of critical course content.
- Customize the foreground and background colors of closed captions to complement your course design and maintain contrast accessibility.
All you need to do is update Storyline 360 in your Articulate 360 desktop app on your computer. You'll find our step-by-step instructions here.
Please let us know if you have any questions by reaching out to our Support Engineers directly.
Have a great day!
50 Replies
- WaltHamiltonSuper Hero
Thanks, Margit
- MichaelAnder569Community Member
Margit, you might be able to use Knut's example above and do that through an Execute Javascript trigger within the course. That way you would not have to modify the published output each time.
- KnutJackowskiCommunity Member
I have considered both ways (editing the css file vs. JavaScript trigger) and for myself chosen the trigger version, because of the additional work with each new published version of a course that the other way needs, but both have their merits and drawbacks:
The biggest drawback of editing the css file is that you have to do it again each time you publish. This can get tedious if you usually publish new version of the same course and it is easy to overlook.
The biggest drawback of using a trigger is that it only works when the slide that the trigger is on, is seen by the learner. When you use the option to resume a course, this might lead to learners skipping the slide that includes the trigger and thus not having the styled captions.
- MichaelAnder569Community Member
Knut, does placing the trigger on the Slide Master help with that or just cause more problems?
- KnutJackowskiCommunity Member
Michael, thanks for that idea. I am doing that now and it seems to provide a solutions to the drawbacks of both methods, that I tried before.
(It will make the DOM a little messy, because it will append the same element for each slide, but I don't think that this will cause any problems.)
EDIT: Just after writing this, I realized, that I could add a test to the JavaScript that first looks for the element and only appends it, when it isn't there. Will do that and post about my results later.
- KnutJackowskiCommunity Member
Works!
I now use a trigger on the Slide Master that executes this JS:/*
This will insert a custom style for captions into a Storyline course.
T make it work, it has to be executed by a trigger, that is on the master slide and gets fired at timeline start.
*/
/*First test if the style is already there from another slide */
var test = document.getElementById("MyStyle");
/* Add the style only if it is not there to avoid cluttering the DOM */
if(!test){
var body = document.querySelector("body");
/* create the element that will hold the style definition */
var style = document.createElement('style');
/* for older browsers it is necessary to give this type information */
style.type = 'text/css';
/* The new style element needs an ID so we can use it to test for its existance */
style.id = 'MyStyle';
/* The following is the style definition that will be applied */
style.appendChild(document.createTextNode(".caption p { background: rgba(236,212,76,0.7); color: black; text-decoration: none; text-shadow: none; font-weight: bold; }"));
/* finally append the element to the "body" of the document. */
body.appendChild(style);
}- MarkLentzCommunity Member
Awesome, Knut! I see they haven't gotten to add this feature yet but your code is JUST what I need to molify my clients now...
- NicoleRalph-117Community Member
- vimalsinghCommunity Member
You are awesome, Knut. Thanks for providing this information.
- MichaelAnder569Community Member
That's great Knut! I'm saving your code for use elsewhere! :)
- VirginiaAbbo662Community Member
Knut, this is great. Do you know how to change the position of the CC box? I would like to lower it on my screen.
- cushCommunity Member
Thank you Knut!
- CaroleMannyCommunity Member
Is adding code really the only way to change the color and font size of the closed captioning? That's more than I bargained for. Under Colors & Effects, we've got Player font, Player font size, and Captions font. Why wasn't a Captions font size included? Changing the player font size does indeed increase the cc text size, as noted elsewhere, but it also increases the font size of everything else. That's not necessarily desirable. Will greater cc style choices be available in the future?
Related Content
- 2 months ago