High-order harmonics extending to the X-ray region generated in a gas medium by intense lasers offer the potential for providing tabletop broadband light sources but so far are limited by their low conversion efficiency. Here we show that harmonics can be enhanced by one to two orders of magnitude without an increase in the total laser power if the laser's waveform is optimized by synthesizing two-or three-colour fields. The harmonics thus generated are also favourably phase-matched so that radiation is efficiently built up in the gas medium. Our results, combined with the emerging intense high-repetition MHz lasers, promise to increase harmonic yields by several orders to make harmonics feasible in the near future as general bright tabletop light sources, including intense attosecond pulses.