I did not get to apply the background color to the columns. I think the only option is to use tables.
Below this line I have attached a simple code that you can paste right on the pdfmake site to try it.
Good luck
var dd = { content: [ 'This paragraph fills full width, as there are no columns. Next paragraph however consists of three columns', { style: 'section', table: { widths: [ '15%', '*', '35%'], body: [ [ { text: 'first column', fillColor: '#555555', color: '#00FFFF', }, { text: 'second column', color: '#555555', fillColor: '#dedede' }, { text: 'third column', fillColor: '#555555' } ] ] }, layout: 'noBorders' } ], styles: { section: { fontSize: 9, color: '#FFFFFF', fillColor: '#2361AE', margin: [0, 15, 0, 5] } }, defaultStyle: { alignment: 'center' } }
source share