Idea is simple:

  1. Create 0×0 size div
  2. Set huge borders where you need, using different colors

Basic example:

width: 0;
height: 0;
border: 50px gray solid;
border-left-color: aqua;
border-top-color: lime;
border-right-color: coral;

the triangle:

width: 0;
height: 0;
border: 50px transparent solid;
border-left-color: aqua;
border-right: none;

the flag:

width: 0;
height: 0;
border: 50px coral solid;
border-right-color: transparent;

triangle pointed to top-right corner

width: 0;
height: 0;
border: 50px transparent solid;
border-top-color: lime;
border-right-color: lime;

Use border size to adjust shape

width: 0;
height: 0;
border: 50px transparent solid;
border-left: 100px aqua solid;
border-right: none;