It should be noted that Uiua actually has a built-in constant containing the colors of the pride flag. That said, this solution avoids using this constant by compressing the colors.
Uiua, 34 33 30 29 2725 bytes
▽34≡↯300↯6_3÷2⊥₃282319238
or 25 bytes with an experimental feature; read on Try it here. Here's the output: (resized to take up less space on the page)
This uses the recently-stabilized function ⊥ base in order to get the colors of the flag.
Uiua's format for images uses has colors as length-3 arrays of numbers between 0 and 1, representing the red, green, and blue components of each pixel. This solution uses a color palette that allows each of these colors to be represented by combinations of 0, 0.5, and 1. The array of colors doubled is all numbers in 0, 1, and 2, which can then be treated as an integer in base-3.
Below is a solution which works in older versions of the language, before the addition of ⊥ base:
Uiua, 34 33 30 29 27 bytes
▽34≡↯300↯6_3⍜⊏÷₂4_15⋯181465
I noticed that the existing Uiua solution used a lot of bytes storing the RGB values of the 6 colors, so I decided to compress those, which is the main reason this is shorter. I chose a color palette just uses 0, 0.5, and 1 as the RGB components of the colors:
red orange yellow green blue purple
color [1 0 0] [1 0.5 0] [1 1 0] [0 1 0] [0 0 1] [0.5 0 1]
hex #ff0000 #ff8000 #ffff00 #00ff00 #0000ff #8000ff
Since there are only two occurrences of 0.5, I decided to store this list by replacing those 0.5s with 1s, read this as binary, and keep track of what the indices of the 0.5s were. This gives the integer 181,465 for the binary, and the (0-based) indices 4 and 15 to be halved:
⋯181465 100110110010001101
4_15 ^ ^
It would be more efficient to double each number and treat it as an integer in base 3, but Uiua's function for conversion to arbitrary bases is base which is too long of a name for the method to be shorter.
To generate the actual image, the program takes 300 of each color, then 34 of each row.
Here's the output: (resized to take up less space on the page)
With # Experimental! features enabled, the function ⊥ base which recently got a glyph allows the usage of base 3 to get the colors, as mentioned above.
▽34≡↯300↯6_3÷2⊥₃282319238

